Module: SimpleAction::Transactable
- Extended by:
- ActiveSupport::Concern
- Included in:
- Service
- Defined in:
- lib/simple_action/concerns/transactable.rb
Instance Method Summary collapse
Instance Method Details
#transaction { ... } ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/simple_action/concerns/transactable.rb', line 23 def transaction return unless block_given? if transaction? ActiveRecord::Base.transaction() do yield end else yield end end |
#transaction? ⇒ Boolean
36 37 38 |
# File 'lib/simple_action/concerns/transactable.rb', line 36 def transaction? true end |
#transaction_options ⇒ Hash
41 42 43 |
# File 'lib/simple_action/concerns/transactable.rb', line 41 def {} end |