method
strict_loading
v8.0.0 -
Show latest stable
- Class:
ActiveRecord::QueryMethods
strict_loading(value = true)public
Sets the returned relation to strict_loading mode. This will raise an error if the record tries to lazily load an association.
user = User.strict_loading.first user.comments.to_a => ActiveRecord::StrictLoadingViolationError