1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

18 commits

Author SHA1 Message Date
José Valim
99b38f371a Move AD::Cascade to the bottom of the middleware stack. 2010-05-16 12:03:11 +02:00
wycats
9cfeefb637 Reorganized initializers a bit to enable better hooks for common cases without the need for Railtie. Specifically, the following hooks were added:
* before_configuration: this hook is run immediately after the Application class 
  comes into existence, but before the user has added any configuration. This is
  the appropriate place to set configuration for your plugin
* before_initialize: This is run after all of the user's configuration has completed,
  but before any initializers have begun (in other words, it runs right after
  config/environments/{development,production,test}.rb)
* after_initialize: This is run after all of the initializers have run. It is an
  appropriate place for forking in a preforking setup

Each of these hooks may be used via ActiveSupport.on_load(name) { }. In all these cases, the context inside the block will be the Application object. This means that for simple cases, you can use these hooks without needing to create a Railtie.
2010-05-15 06:09:07 -07:00
Jeremy Kemper
fef31be2bc Add missing deprecation requires 2010-04-29 11:34:48 -07:00
José Valim
3dfcb56e45 ActiveRecord middlewares should be inserted before AD::Cascade [#4493 state:resolved]. 2010-04-29 13:24:35 +02:00
José Valim
1b816d5024 The rake task :environment now loads config/environment.rb instead of initializing the application on its own. This fixes [#4492 state:resolved] and also avoids the application being initialized twice in some rake tasks. 2010-04-29 08:39:52 +02:00
José Valim
4163ccec23 Clean up the config object in ActionPack. Create config_accessor which just delegates to the config object, reducing the number of deprecations and add specific tests. 2010-04-22 12:00:13 +02:00
Anil Wadghule
84e46437fa Replace 'RAILS_ROOT' to 'Rails.root' and 'RAILS_ENV' to 'Rails.env' in significant places. 2010-04-12 22:53:49 +05:30
José Valim
4e92134dfa Fix a bug in ActionDispatch::Static where Rails cannot find assets if started in another directory which is not the RAILS_ROOT. 2010-04-08 12:52:37 +02:00
José Valim
ec73710c79 Alleviate the pain in working with utf8 templates by setting a default encoding. 2010-04-07 02:25:36 +02:00
José Valim
6690d66292 Rename config.cookie_secret to config.secret_token and pass it as configuration in request.env. This is another step forward removing global configuration. 2010-04-05 12:00:24 +02:00
Rolf Bjaanes
d898a4ba42 Raise exceptions instead of rendering error templates in test environment [#4315 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-04-02 20:47:42 +02:00
José Valim
395d6648ce Move application configuration to the application configuration object, remove railtie_name and engine_name and allow to set the configuration object. 2010-03-26 18:47:55 +01:00
Joshua Peek
f38e89cfba Move railties/builtin into lib 2010-03-20 12:34:21 -05:00
Carlhuda
ae93789d9a Move middlewares to the Application level. If you want to modify the middleware, either use Rails.application.config.middleware or modify it in an initializer (if you need to set it relative to user-specified middleware). 2010-03-08 11:40:51 -08:00
Carlhuda
c2dbc391a9 Have log subscribers subscribe to the actual events, so the subscriber doesn't subscribe to *every* event, so we can have events that are slow-ish but are not actually run in production. 2010-03-02 13:05:25 -08:00
José Valim
0dece7929c Deprecate AC configuration values which were moved to Rack. 2010-02-01 11:40:27 +01:00
José Valim
64ea3dfd9f Add reloadable specific for engines and move environment to application paths.
Signed-off-by: Carl Lerche <carllerche@mac.com>
2010-01-28 10:28:41 -08:00
José Valim
b17e358e3d Move configuration to subfolders. 2010-01-23 22:30:17 +01:00