Class: ActiveRecord::Validations::LengthValidator
- Inherits:
-
ActiveModel::Validations::LengthValidator
- Object
- ActiveModel::Validator
- ActiveModel::EachValidator
- ActiveModel::Validations::LengthValidator
- ActiveRecord::Validations::LengthValidator
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/active_record/validations/length.rb
Overview
:nodoc:
Constant Summary
Constants inherited from ActiveModel::Validations::LengthValidator
ActiveModel::Validations::LengthValidator::CHECKS, ActiveModel::Validations::LengthValidator::MESSAGES, ActiveModel::Validations::LengthValidator::RESERVED_OPTIONS
Instance Attribute Summary
Attributes inherited from ActiveModel::EachValidator
Attributes inherited from ActiveModel::Validator
Instance Method Summary collapse
Methods inherited from ActiveModel::Validations::LengthValidator
Methods inherited from ActiveModel::EachValidator
#check_validity!, #initialize, #validate
Methods inherited from ActiveModel::Validator
#initialize, kind, #kind, #validate
Constructor Details
This class inherits a constructor from ActiveModel::Validations::LengthValidator
Instance Method Details
#validate_each(record, attribute, association_or_value) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/active_record/validations/length.rb', line 6 def validate_each(record, attribute, association_or_value) if association_or_value.respond_to?(:loaded?) && association_or_value.loaded? association_or_value = association_or_value.target.reject(&:marked_for_destruction?) end super end |