summaryrefslogtreecommitdiff
path: root/app/uploaders
diff options
context:
space:
mode:
Diffstat (limited to 'app/uploaders')
-rw-r--r--app/uploaders/attachment_uploader.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/uploaders/attachment_uploader.rb b/app/uploaders/attachment_uploader.rb
index 960e71ef640..c0afe9686f1 100644
--- a/app/uploaders/attachment_uploader.rb
+++ b/app/uploaders/attachment_uploader.rb
@@ -21,10 +21,10 @@ class AttachmentUploader < CarrierWave::Uploader::Base
end
def secure_url
- if self.class.storage == CarrierWave::Storage::File
- "/files/#{model.class.to_s.underscore}/#{model.id}/#{file.filename}"
- else
- url
- end
+ "/files/#{model.class.to_s.underscore}/#{model.id}/#{file.filename}"
+ end
+
+ def file_storage?
+ self.class.storage == CarrierWave::Storage::File
end
end