Module: Actions::Storage
- Defined in:
- lib/actions/action/storage.rb
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
11 12 13 14 15 |
# File 'lib/actions/action/storage.rb', line 11 def call store_around(:started, :done, :failed) do super end end |
#initialize(context = {}) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/actions/action/storage.rb', line 4 def initialize(context = {}) super rescue Actions::Errors::ValidationFailed => error context = JSON.load(JSON.dump(error.context.to_h)) store(:validation_failed, context, { message: context. }) end |
#rollback ⇒ Object
17 18 19 20 21 |
# File 'lib/actions/action/storage.rb', line 17 def rollback store_around(:rollback_started, :rollback_succeeded, :rollback_failed) do super end end |