engine/lib/locomotive/custom_fields.rb

26 lines
504 B
Ruby
Raw Normal View History

2011-05-24 19:23:05 +00:00
# Custom options for CustomFields
CustomFields.options = {
:reserved_names => Mongoid.destructive_fields + %w(created_at updated_at)
2011-05-24 19:23:05 +00:00
}
# Set correct paths
module CustomFields
module Types
module File
class FileUploader < ::CarrierWave::Uploader::Base
def store_dir
"sites/#{model.site_id}/contents/#{model.class.model_name.underscore}/#{model.id}/files"
end
def cache_dir
"#{Rails.root}/tmp/uploads"
end
end
end
2011-07-28 14:42:16 +00:00
end
end
2011-03-17 16:41:25 +00:00