Class: CarrierWave::Validations::ActiveModel::IntegrityValidator
- Inherits:
-
ActiveModel::EachValidator
- Object
- ActiveModel::EachValidator
- CarrierWave::Validations::ActiveModel::IntegrityValidator
- Defined in:
- lib/carrierwave/validations/active_model.rb
Instance Method Summary collapse
Instance Method Details
#validate_each(record, attribute, value) ⇒ Object
23 24 25 26 27 28 |
# File 'lib/carrierwave/validations/active_model.rb', line 23 def validate_each(record, attribute, value) record.__send__("#{attribute}_integrity_errors").each do |e| = (e. == e.class.to_s) ? :carrierwave_integrity_error : e. record.errors.add(attribute, ) end end |