Class: DefaultChangeValidator
- Inherits:
-
ActiveModel::EachValidator
- Object
- ActiveModel::EachValidator
- DefaultChangeValidator
- Defined in:
- lib/csv_row_model/validators/default_change.rb
Overview
:nodoc:
Instance Method Summary collapse
Instance Method Details
#validate_each(record, attribute, value) ⇒ Object
2 3 4 5 |
# File 'lib/csv_row_model/validators/default_change.rb', line 2 def validate_each(record, attribute, value) return unless record.default_changes[attribute] record.errors.add(attribute, 'changed by default') end |