Module: Cash::ClassMethods

Defined in:
lib/cache_money.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.extended(active_record_class) ⇒ Object



45
46
47
48
49
# File 'lib/cache_money.rb', line 45

def self.extended(active_record_class)
  class << active_record_class
    alias_method_chain :transaction, :cache_transaction
  end
end

Instance Method Details

#transaction_with_cache_transaction(&block) ⇒ Object



51
52
53
# File 'lib/cache_money.rb', line 51

def transaction_with_cache_transaction(&block)
  repository.transaction { transaction_without_cache_transaction(&block) }
end