Skip to content

Commit 9553814

Browse files
authored
Merge pull request rails#45628 from asavageiv/alan/fix-lock-documentation [ci-skip]
Document ActiveRecord::Locking::Pessimistic#with_lock reloads the record
2 parents 107dd46 + 6ba065c commit 9553814

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

activerecord/lib/active_record/locking/pessimistic.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ def lock!(lock = true)
8080
self
8181
end
8282

83-
# Wraps the passed block in a transaction, locking the object
84-
# before yielding. You can pass the SQL locking clause
83+
# Wraps the passed block in a transaction, reloading the object with a
84+
# lock before yielding. You can pass the SQL locking clause
8585
# as an optional argument (see #lock!).
8686
#
8787
# You can also pass options like <tt>requires_new:</tt>, <tt>isolation:</tt>,

0 commit comments

Comments
 (0)