From a699ebdbcc11051b9473a88788cf8efdde659975 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Mon, 11 Feb 2013 21:31:19 +0200 Subject: handle attahcment with send_file --- app/uploaders/attachment_uploader.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/uploaders') 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 -- cgit v1.2.1