class method self.add_lock!

Ruby on Rails 2.2.3

Since v2.2.3 Last seen in v2.3.18 Private

Available 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

sql req
options req
scope opt = :auto
Source
# File activerecord/lib/active_record/base.rb, line 1714
        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 1714 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::Base

Type at least 2 characters to search.

↑↓ navigate · open · esc close