Module: ActiveInteractor::Interactor::Callbacks

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

Overview

Interactor callback methods. Because Callbacks is a module classes should include Callbacks rather than inherit from it.

See Also:

Author:

Since:

  • 0.1.0

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object

Since:

  • 0.1.0



283
284
285
286
287
288
289
290
# File 'lib/active_interactor/interactor/callbacks.rb', line 283

def self.included(base)
  base.class_eval do
    define_callbacks :validation,
                     skip_after_callbacks_if_terminated: true,
                     scope: %i[kind name]
    define_callbacks :perform, :rollback
  end
end