Module: ActiveInteractor::Interactor::Callbacks

Defined in:
lib/active_interactor/interactor/callbacks.rb

Overview

Interactor callback methods included by all Base

Author:

Since:

  • 0.0.1

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object

Since:

  • 0.0.1


13
14
15
16
17
18
19
20
21
22
23
# File 'lib/active_interactor/interactor/callbacks.rb', line 13

def self.included(base)
  base.class_eval do
    extend ClassMethods
    include ActiveSupport::Callbacks

    define_callbacks :validation,
                     skip_after_callbacks_if_terminated: true,
                     scope: %i[kind name]
    define_callbacks :perform, :rollback
  end
end