mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Beef up Rails::Railtie::Configuration docs
This commit is contained in:
parent
f3666040a0
commit
6c309f04c9
1 changed files with 8 additions and 0 deletions
|
@ -31,26 +31,34 @@ module Rails
|
|||
app_generators(&block)
|
||||
end
|
||||
|
||||
# First configurable block to run. Called before any initializers are run.
|
||||
def before_configuration(&block)
|
||||
ActiveSupport.on_load(:before_configuration, :yield => true, &block)
|
||||
end
|
||||
|
||||
# Third configurable block to run. Does not run if config.cache_classes
|
||||
# set to false.
|
||||
def before_eager_load(&block)
|
||||
ActiveSupport.on_load(:before_eager_load, :yield => true, &block)
|
||||
end
|
||||
|
||||
# Second configurable block to run. Called before frameworks initialize.
|
||||
def before_initialize(&block)
|
||||
ActiveSupport.on_load(:before_initialize, :yield => true, &block)
|
||||
end
|
||||
|
||||
# Last configurable block to run. Called after frameworks initialize.
|
||||
def after_initialize(&block)
|
||||
ActiveSupport.on_load(:after_initialize, :yield => true, &block)
|
||||
end
|
||||
|
||||
# Array of callbacks defined by #to_prepare.
|
||||
def to_prepare_blocks
|
||||
@@to_prepare_blocks ||= []
|
||||
end
|
||||
|
||||
# Defines generic callbacks to run before #after_initialize. Useful for
|
||||
# Rails::Railtie subclasses.
|
||||
def to_prepare(&blk)
|
||||
to_prepare_blocks << blk if blk
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue