Class: Saviour::DbHelpers::RollbackDummy

Inherits:
Object
  • Object
show all
Defined in:
lib/saviour/db_helpers.rb

Instance Method Summary collapse

Constructor Details

#initialize(block) ⇒ RollbackDummy



31
32
33
# File 'lib/saviour/db_helpers.rb', line 31

def initialize(block)
  @block = block
end

Instance Method Details

#before_committed!Object



43
44
# File 'lib/saviour/db_helpers.rb', line 43

def before_committed!(*)
end

#close_transactionObject



40
41
# File 'lib/saviour/db_helpers.rb', line 40

def close_transaction(*)
end

#committed!Object



46
47
# File 'lib/saviour/db_helpers.rb', line 46

def committed!(*)
end

#rolledback!Object



35
36
37
38
# File 'lib/saviour/db_helpers.rb', line 35

def rolledback!(*)
  @block.call
  close_transaction
end

#trigger_transactional_callbacks?Boolean



49
50
# File 'lib/saviour/db_helpers.rb', line 49

def trigger_transactional_callbacks?(*)
end