Sha256: 704d884f77f8d722865a422b2c6c93407888944fb464e1cc9382210dbcb038d0
Contents?: true
Size: 437 Bytes
Versions: 32
Compression:
Stored size: 437 Bytes
Contents
module Neo4j module Rails module TxMethods def tx_methods(*methods) methods.each do |method| tx_method = "#{method}_in_tx" send(:alias_method, tx_method, method) send(:define_method, method) do |*args| Neo4j::Rails::Transaction.running? ? send(tx_method, *args) : Neo4j::Rails::Transaction.run { send(tx_method, *args) } end end end end end end
Version data entries
32 entries across 32 versions & 1 rubygems