instance method
inherited
Ruby on Rails 3.2.22.5
Since v3.0.20 Last seen in v3.2.22.5Signature
inherited(base)
Copy validators on inheritance.
Parameters
-
basereq
Source
# File activemodel/lib/active_model/validations.rb, line 162
def inherited(base)
dup = _validators.dup
base._validators = dup.each { |k, v| dup[k] = v.dup }
super
end
Defined in activemodel/lib/active_model/validations.rb line 162
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveModel::Validations::ClassMethods