Module: ActiveInteractor::Rails

Defined in:
lib/active_interactor/rails.rb,
lib/active_interactor/rails/config.rb,
lib/active_interactor/rails/models.rb,
lib/active_interactor/rails/railtie.rb

Overview

Rails specific classes, helpers, and utlities

Author:

Since:

  • 1.0.0

Defined Under Namespace

Modules: Models Classes: Config, Railtie

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.configActiveInteractor::Config

The ActiveInteractor::Rails configuration

Returns:

Since:

  • 1.0.0


30
31
32
# File 'lib/active_interactor/rails/config.rb', line 30

def self.config
  @config ||= Config.new
end

.configure {|ActiveInteractor::Rails#config| ... } ⇒ Object

Examples:

Configure ActiveInteractor

ActiveInteractor.configure do |config|
  config.logger = Rails.logger
end

Yields:

Since:

  • 1.0.0


41
42
43
# File 'lib/active_interactor/rails/config.rb', line 41

def self.configure
  yield config
end

Instance Method Details

#initialize(options = {}) ⇒ Config

Returns a new instance of Config.

Parameters:

  • options (Hash) (defaults to: {})

    the options for the configuration

Options Hash (options):

  • :directory (String) — default: defaults to: 'interactors'

    the configuration directory property

  • :generate_context_classes (Boolean) — default: defaults to: `true`

    the configuration generate_context_class property.

Returns:


# File 'lib/active_interactor/rails/config.rb', line 19