Module: InteractorSupport::Actions

Extended by:
ActiveSupport::Concern
Defined in:
lib/interactor_support/actions.rb

Overview

A bundle of DSL-style concerns that enhance interactors with expressive, composable behavior.

This module is intended to be included into an Interactor or Organizer, providing access to a suite of declarative action helpers:

  • Skippable — Conditionally skip execution
  • Transactionable — Wrap logic in an ActiveRecord transaction
  • Updatable — Update records using context-driven attributes
  • Findable — Find one or many records into context
  • Transformable — Normalize or modify context values before execution

Examples:

Use in an interactor

class UpdateUser
  include Interactor
  include InteractorSupport::Actions

  find_by :user

  transform :email, with: [:strip, :downcase]

  update :user, attributes: { email: :email }
end

See Also: