Class: ActiveModel::Validations::ImageValidator

Inherits:
EachValidator
  • Object
show all
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 = options
    
  ratio_valid? if options[:ratio_range]
end