Class: ActiveModel::Validations::FiltersValidator
- Inherits:
-
EachValidator
- Object
- EachValidator
- ActiveModel::Validations::FiltersValidator
- Defined in:
- lib/active_model/validations/filters_validator.rb
Instance Method Summary collapse
-
#initialize(options) ⇒ FiltersValidator
constructor
A new instance of FiltersValidator.
- #validate_each(_record, _attribute, _value) ⇒ Object
Constructor Details
#initialize(options) ⇒ FiltersValidator
Returns a new instance of FiltersValidator.
6 7 8 9 10 11 |
# File 'lib/active_model/validations/filters_validator.rb', line 6 def initialize() filters = .slice(*AttrFilters::Filters::LIST.keys) model_class = [:class] model_class.filters(*[:attributes], filters) super() end |
Instance Method Details
#validate_each(_record, _attribute, _value) ⇒ Object
13 |
# File 'lib/active_model/validations/filters_validator.rb', line 13 def validate_each(_record, _attribute, _value); end |