Skip to content

Commit d2ffa44

Browse files
committed
Ensure relation is loaded before mutation [ci-skip]
1 parent f7790e1 commit d2ffa44

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

activerecord/lib/active_record/errors.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,7 @@ def initialize(model = nil, description = nil)
490490
# end
491491
#
492492
# relation = Task.all
493+
# relation.load
493494
# relation.loaded? # => true
494495
#
495496
# # Methods which try to mutate a loaded relation fail.

0 commit comments

Comments
 (0)