Module: GraphMediator::Locking

Defined in:
lib/graph_mediator/locking.rb

Overview

Overrides to ActiveRecord::Optimistic::Locking to ensure that lock_column is updated during the versioning phase of a mediated transaction.

Defined Under Namespace

Modules: ClassMethods, InstanceMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



6
7
8
9
10
# File 'lib/graph_mediator/locking.rb', line 6

def self.included(base)
  base.extend(ClassMethods)
  base.send(:alias_method, :locking_enabled_without_mediation?, :locking_enabled?)
  base.send(:include, InstanceMethods)
end