Fix/improve strict_loading examples [ci skip]

Follow-up of ac9b11a830c98b48f2b08c32fc28873abcaed313.
This commit is contained in:
Carlos Antonio da Silva 2020-02-20 13:25:22 -03:00
parent ac9b11a830
commit 3656bd81c3
2 changed files with 2 additions and 2 deletions

@ -5,7 +5,7 @@
Usage:
```
>> Developer.strict_loading.first
>> dev = Developer.strict_loading.first
>> dev.audit_logs.to_a
=> ActiveRecord::StrictLoadingViolationError: Developer is marked as strict_loading and AuditLog cannot be lazily loaded.
```

@ -855,7 +855,7 @@ def readonly!(value = true) # :nodoc:
# Sets the returned relation to strict_loading mode. This will raise an error
# if the record tries to lazily load an association.
#
# user = User.first.strict_loading
# user = User.strict_loading.first
# user.comments.to_a
# => ActiveRecord::StrictLoadingViolationError
def strict_loading(value = true)