Rails::Railtie::Configuration (original) (raw)

Methods

A

B

G

N

R

T

Class Public methods

new()

Source: show

def initialize @@options ||= {} end

Instance Public methods

after_initialize(&block)

Last configurable block to run. Called after frameworks initialize.

Source: show

def after_initialize(&block) ActiveSupport.on_load(:after_initialize, :yield => true, &block) end

app_generators()

This allows you to modify application’s generators from Railties.

Values set on #app_generators will become defaults for application, unless application overwrites them.

Source: show

def app_generators @@app_generators ||= Rails::Configuration::Generators.new yield(@@app_generators) if block_given? @@app_generators end

app_middleware()

This allows you to modify the application’s middlewares from Engines.

All operations you run on the #app_middleware will be replayed on the application once it is defined and the default_middlewares are created

Source: show

def app_middleware @@app_middleware ||= Rails::Configuration::MiddlewareStackProxy.new end

before_configuration(&block)

First configurable block to run. Called before any initializers are run.

Source: show

def before_configuration(&block) ActiveSupport.on_load(:before_configuration, :yield => true, &block) end

before_eager_load(&block)

Third configurable block to run. Does not run if config.cache_classes set to false.

Source: show

def before_eager_load(&block) ActiveSupport.on_load(:before_eager_load, :yield => true, &block) end

before_initialize(&block)

Second configurable block to run. Called before frameworks initialize.

Source: show

def before_initialize(&block) ActiveSupport.on_load(:before_initialize, :yield => true, &block) end

generators(&block)

Source: show

def generators(&block) ActiveSupport::Deprecation.warn "config.generators in Rails::Railtie is deprecated. Please use config.app_generators instead." app_generators(&block) end

respond_to?(name)

Source: show

def respond_to?(name) super || @@options.key?(name.to_sym) end

to_prepare(&blk)

Source: show

def to_prepare(&blk) to_prepare_blocks << blk if blk end

to_prepare_blocks()

Source: show

def to_prepare_blocks @@to_prepare_blocks ||= [] end