Module: Mongoid::OptimisticLocking::Unlocked

Extended by:
ActiveSupport::Concern
Included in:
Mongoid::OptimisticLocking
Defined in:
lib/mongoid/optimistic_locking/unlocked.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#optimistic_locking?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/mongoid/optimistic_locking/unlocked.rb', line 12

def optimistic_locking?
  Threaded.optimistic_locking?
end

#unlockedObject



7
8
9
10
# File 'lib/mongoid/optimistic_locking/unlocked.rb', line 7

def unlocked
  Threaded.unlocked = true
  self
end