Module: Sunrise::CarrierWave::Glue::ClassMethods
- Defined in:
- lib/sunrise/carrier_wave/glue.rb
Instance Method Summary collapse
- #sunrise_uploader(uploader = nil, options = {}, &block) ⇒ Object
- #validates_filesize_of(*attr_names) ⇒ Object
Instance Method Details
#sunrise_uploader(uploader = nil, options = {}, &block) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/sunrise/carrier_wave/glue.rb', line 11 def sunrise_uploader(uploader=nil, ={}, &block) = { :mount_on => :data_file_name }.merge() mount_uploader(:data, uploader, , &block) validates_processing_of :data end |
#validates_filesize_of(*attr_names) ⇒ Object
19 20 21 |
# File 'lib/sunrise/carrier_wave/glue.rb', line 19 def validates_filesize_of(*attr_names) validates_with FileSizeValidator, _merge_attributes(attr_names) end |