Class: Balloon::Validate::DownloadValidator
- Inherits:
-
ActiveModel::EachValidator
- Object
- ActiveModel::EachValidator
- Balloon::Validate::DownloadValidator
- Defined in:
- lib/balloon/validate.rb
Instance Method Summary collapse
Instance Method Details
#validate_each(record, attr_name, value) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/balloon/validate.rb', line 13 def validate_each(record, attr_name, value) if e = record.send(:download_error) = (e. == e.class.to_s) ? :download_error : e. record.errors.add(attr_name, ) end end |