1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix scope typo in add_lock! Closes #6482. [zubek]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5907 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Jeremy Kemper 2007-01-12 10:18:11 +00:00
parent 41198ad3ad
commit c302cdfcc4

View file

@ -1143,7 +1143,7 @@ module ActiveRecord #:nodoc:
# The optional scope argument is for the current :find scope.
# The :lock option has precedence over a scoped :lock.
def add_lock!(sql, options, scope = :auto)
scope = scope(:find) if :auto == :scope
scope = scope(:find) if :auto == scope
options = options.reverse_merge(:lock => scope[:lock]) if scope
connection.add_lock!(sql, options)
end