diff options
Diffstat (limited to 'railties/guides/source/configuring.textile')
-rw-r--r-- | railties/guides/source/configuring.textile | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/railties/guides/source/configuring.textile b/railties/guides/source/configuring.textile index 96b279ed8d..7b1ac5ece5 100644 --- a/railties/guides/source/configuring.textile +++ b/railties/guides/source/configuring.textile @@ -276,11 +276,11 @@ h4. Configuring Action Dispatch * +config.action_dispatch.tld_length+ sets the TLD (top-level domain) length for the application. Defaults to +1+. -* +ActionDispatch::Callbacks.before+ takes a block of code to run before the request. +* +ActionDispatch::Callbacks.before+ takes a block of code to run before the request. * +ActionDispatch::Callbacks.to_prepare+ takes a block to run after +ActionDispatch::Callbacks.before+, but before the request. Runs for every request in +development+ mode, but only once for +production+ or environments with +cache_classes+ set to +true+. -* +ActionDispatch::Callbacks.after+ takes a block of code to run after the request. +* +ActionDispatch::Callbacks.after+ takes a block of code to run after the request. h4. Configuring Action View @@ -396,7 +396,7 @@ Rails has 5 initialization events which can be hooked into (listed in order that * +before_initialize+: This is run directly before the initialization process of the application occurs with the +:bootstrap_hook+ initializer near the beginning of the Rails initialization process. -* +to_prepare+: Run after the initializers are ran for all Railties (including the application itself), but before eager loading and the middleware stack is built. +* +to_prepare+: Run after the initializers are ran for all Railties (including the application itself), but before eager loading and the middleware stack is built. * +before_eager_load+: This is run directly before eager loading occurs, which is the default behaviour for the _production_ environment and not for the +development+ enviroment. @@ -415,7 +415,7 @@ initializer "active_support.initialize_whiny_nils" do |app| end </ruby> -The +initializer+ method takes three arguments with the first being the name for the initializer and the second being an options hash (not shown here) and the third being a block. The +:before+ key in the options hash can be specified to specify which initializer this new initializer must run before, and the +:after+ key will specify which initializer to run this initializer _after_. +The +initializer+ method takes three arguments with the first being the name for the initializer and the second being an options hash (not shown here) and the third being a block. The +:before+ key in the options hash can be specified to specify which initializer this new initializer must run before, and the +:after+ key will specify which initializer to run this initializer _after_. Initializers defined using the +initializer+ method will be ran in the order they are defined in, with the exception of ones that use the +:before+ or +:after+ methods. |