instance method attributes_from_column_definition_with_lock

Ruby on Rails 2.3.18

Since v2.2.3 Last seen in v2.3.18 Private

Available in: v2.2.3 v2.3.18

Signature

attributes_from_column_definition_with_lock()

No documentation comment.

Source
# File activerecord/lib/active_record/locking/optimistic.rb, line 65
        def attributes_from_column_definition_with_lock
          result = attributes_from_column_definition_without_lock

          # If the locking column has no default value set,
          # start the lock version at zero.  Note we can't use
          # locking_enabled? at this point as @attributes may
          # not have been initialized yet

          if lock_optimistically && result.include?(self.class.locking_column)
            result[self.class.locking_column] ||= 0
          end

          return result
        end

Defined in activerecord/lib/active_record/locking/optimistic.rb line 65 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::Locking::Optimistic

Type at least 2 characters to search.

↑↓ navigate · open · esc close