attachment_uploader.rb 195 Bytes EditWeb IDE 1 2 3 4 5 6 7 8 9 class AttachmentUploader < CarrierWave::Uploader::Base include UploaderHelper storage :file def store_dir "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" end end