method
raise_on_type_mismatch
v3.2.8 -
Show latest stable
- Class:
ActiveRecord::Associations::Association
raise_on_type_mismatch(record)private
Raises ActiveRecord::AssociationTypeMismatch unless record is of the kind of the class of the associated objects. Meant to be used as a sanity check when you are about to assign an associated record.