diff options
Diffstat (limited to 'app/uploaders')
| -rw-r--r-- | app/uploaders/custom_field_attachment_uploader.rb | 12 | 
1 files changed, 12 insertions, 0 deletions
| diff --git a/app/uploaders/custom_field_attachment_uploader.rb b/app/uploaders/custom_field_attachment_uploader.rb new file mode 100644 index 000000000..411b65bc3 --- /dev/null +++ b/app/uploaders/custom_field_attachment_uploader.rb @@ -0,0 +1,12 @@ +class CustomFieldAttachmentUploader < CarrierWave::Uploader::Base + +  storage :file + +  def store_dir +    "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" +  end + +  def extension_whitelist +    model.send "#{mounted_as}_extension_whitelist" +  end +end | 
