method
strict_loading!
v6.1.7.7 -
Show latest stable
- Class:
ActiveRecord::Core
strict_loading!()public
Sets the record to strict_loading mode. This will raise an error if the record tries to lazily load an association.
user = User.first user.strict_loading! user.comments.to_a => ActiveRecord::StrictLoadingViolationError