engine/app/uploaders/editable_file_uploader.rb

7 lines
173 B
Ruby

class EditableFileUploader < ::CarrierWave::Uploader::Base
def store_dir
self.build_store_dir('sites', model.page.site_id, 'pages', model.page.id, 'files')
end
end