diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index b6bdf65d0f..c51564ecfc 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -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