Method: Mongoid::Validatable::Macros#validates_associated
- Defined in:
- lib/mongoid/validatable/macros.rb
#validates_associated(*args) ⇒ Object
Validates whether or not an association is valid or not. Will correctly handle has one and has many associations.
27 28 29 |
# File 'lib/mongoid/validatable/macros.rb', line 27 def validates_associated(*args) validates_with(AssociatedValidator, _merge_attributes(args)) end |