diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-02-11 21:31:19 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-02-11 21:31:19 +0200 |
commit | a699ebdbcc11051b9473a88788cf8efdde659975 (patch) | |
tree | 05528b1407ed5375809d2cb936b7ebbcf647721a /app/uploaders | |
parent | ab0cfc00367a60cfe9cc488521bf55882d54769a (diff) | |
download | gitlab-ce-a699ebdbcc11051b9473a88788cf8efdde659975.tar.gz |
handle attahcment with send_file
Diffstat (limited to 'app/uploaders')
-rw-r--r-- | app/uploaders/attachment_uploader.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/uploaders/attachment_uploader.rb b/app/uploaders/attachment_uploader.rb index 3dbf2860bd4..3dd2117e339 100644 --- a/app/uploaders/attachment_uploader.rb +++ b/app/uploaders/attachment_uploader.rb @@ -19,4 +19,8 @@ class AttachmentUploader < CarrierWave::Uploader::Base rescue false end + + def secure_url + "/files/#{model.class.to_s.underscore}/#{model.id}/#{file.filename}" + end end |