File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
activerecord/lib/active_record Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -695,9 +695,9 @@ def strict_loading?
695
695
# user = User.first
696
696
# user.strict_loading! # => true
697
697
# user.address.city
698
- # => ActiveRecord::StrictLoadingViolationError
698
+ # # => ActiveRecord::StrictLoadingViolationError
699
699
# user.comments.to_a
700
- # => ActiveRecord::StrictLoadingViolationError
700
+ # # => ActiveRecord::StrictLoadingViolationError
701
701
#
702
702
# ==== Parameters
703
703
#
@@ -717,7 +717,7 @@ def strict_loading?
717
717
# user.address.city # => "Tatooine"
718
718
# user.comments.to_a # => [#<Comment:0x00...]
719
719
# user.comments.first.ratings.to_a
720
- # => ActiveRecord::StrictLoadingViolationError
720
+ # # => ActiveRecord::StrictLoadingViolationError
721
721
def strict_loading! ( value = true , mode : :all )
722
722
unless [ :all , :n_plus_one_only ] . include? ( mode )
723
723
raise ArgumentError , "The :mode option must be one of [:all, :n_plus_one_only] but #{ mode . inspect } was provided."
Original file line number Diff line number Diff line change @@ -1299,7 +1299,7 @@ def null_relation? # :nodoc:
1299
1299
#
1300
1300
# users = User.readonly
1301
1301
# users.first.save
1302
- # => ActiveRecord::ReadOnlyRecord: User is marked as readonly
1302
+ # # => ActiveRecord::ReadOnlyRecord: User is marked as readonly
1303
1303
#
1304
1304
# To make a readonly relation writable, pass +false+.
1305
1305
#
@@ -1320,7 +1320,7 @@ def readonly!(value = true) # :nodoc:
1320
1320
#
1321
1321
# user = User.strict_loading.first
1322
1322
# user.comments.to_a
1323
- # => ActiveRecord::StrictLoadingViolationError
1323
+ # # => ActiveRecord::StrictLoadingViolationError
1324
1324
def strict_loading ( value = true )
1325
1325
spawn . strict_loading! ( value )
1326
1326
end
You can’t perform that action at this time.
0 commit comments