Class: ActiveModel::Validations::ImageValidator
- Inherits:
-
EachValidator
- Object
- EachValidator
- ActiveModel::Validations::ImageValidator
- Defined in:
- lib/lupca/carrierwave_image_validation.rb
Instance Method Summary collapse
Instance Method Details
#validate_each(record, attribute, value) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/lupca/carrierwave_image_validation.rb', line 9 def validate_each(record, attribute, value) @record = record @attribute = attribute @value = value @options = ratio_valid? if [:ratio_range] end |