diff options
Diffstat (limited to 'railties/lib/rails/application.rb')
-rw-r--r-- | railties/lib/rails/application.rb | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 953233d774..559739b2ec 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -78,10 +78,6 @@ module Rails require environment if environment end - def eager_load! #:nodoc: - railties.all(&:eager_load!) - super - end def reload_routes! routes_reloader.reload! @@ -100,26 +96,25 @@ module Rails def load_tasks(app=self) initialize_tasks - railties.all { |r| r.load_tasks(app) } - super - self - end - - def load_generators(app=self) - initialize_generators - railties.all { |r| r.load_generators(app) } - Rails::Generators.configure!(app.config.generators) super self end def load_console(app=self) initialize_console - railties.all { |r| r.load_console(app) } super self end + # Rails.application.env_config stores some of the Rails initial environment parameters. + # Currently stores: + # + # * action_dispatch.parameter_filter" => config.filter_parameters, + # * action_dispatch.secret_token" => config.secret_token, + # * action_dispatch.show_exceptions" => config.action_dispatch.show_exceptions + # + # These parameters will be used by middlewares and engines to configure themselves. + # def env_config @env_config ||= super.merge({ "action_dispatch.parameter_filter" => config.filter_parameters, @@ -138,6 +133,10 @@ module Rails @config ||= Application::Configuration.new(find_root_with_flag("config.ru", Dir.pwd)) end + def to_app + self + end + protected alias :build_middleware_stack :app @@ -195,10 +194,6 @@ module Rails end end - def initialize_generators - require "rails/generators" - end - def initialize_console require "pp" require "rails/console/app" |