class method
self.add_lock!
Ruby on Rails 2.3.18
Since v2.2.3 Last seen in v2.3.18 PrivateAvailable in: v2.2.3 v2.3.18
Signature
self.add_lock!(sql, options, scope = :auto)
The optional scope argument is for the current :find scope. The :lock option has precedence over a scoped :lock.
Parameters
-
sqlreq -
optionsreq -
scopeopt = :auto
Source
# File activerecord/lib/active_record/base.rb, line 1808
def add_lock!(sql, options, scope = :auto)
scope = scope(:find) if :auto == scope
options = options.reverse_merge(:lock => scope[:lock]) if scope
connection.add_lock!(sql, options)
end
Defined in activerecord/lib/active_record/base.rb line 1808
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Base