Class: Maglev::PresenceValidator

Inherits:
ActiveModel::Validations::PresenceValidator
  • Object
show all
Defined in:
app/validators/maglev/presence_validator.rb

Instance Method Summary collapse

Instance Method Details

#validate_each(record, attribute, value) ⇒ Object



5
6
7
8
# File 'app/validators/maglev/presence_validator.rb', line 5

def validate_each(record, attribute, value)
  value = 'false' if value == false # trick the validator
  super
end