diff options
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/application.rb | 4 | ||||
-rw-r--r-- | railties/lib/rails/engine.rb | 3 | ||||
-rw-r--r-- | railties/lib/rails/info_controller.rb | 3 | ||||
-rw-r--r-- | railties/lib/rails/tasks/routes.rake | 4 |
4 files changed, 7 insertions, 7 deletions
diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index d5ec2cbfd9..3afbf0a03e 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -267,6 +267,7 @@ module Rails def default_middleware_stack #:nodoc: ActionDispatch::MiddlewareStack.new.tap do |middleware| + app = self if rack_cache = config.action_controller.perform_caching && config.action_dispatch.rack_cache require "action_dispatch/http/rack_cache" middleware.use ::Rack::Cache, rack_cache @@ -290,11 +291,10 @@ module Rails middleware.use ::ActionDispatch::RequestId middleware.use ::Rails::Rack::Logger, config.log_tags # must come after Rack::MethodOverride to properly log overridden methods middleware.use ::ActionDispatch::ShowExceptions, config.exceptions_app || ActionDispatch::PublicExceptions.new(Rails.public_path) - middleware.use ::ActionDispatch::DebugExceptions + middleware.use ::ActionDispatch::DebugExceptions, app middleware.use ::ActionDispatch::RemoteIp, config.action_dispatch.ip_spoofing_check, config.action_dispatch.trusted_proxies unless config.cache_classes - app = self middleware.use ::ActionDispatch::Reloader, lambda { app.reload_dependencies? } end diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index 383c159d3d..f469c334a7 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -176,8 +176,7 @@ module Rails # # * routes: when you mount an Engine with <tt>mount(MyEngine::Engine => '/my_engine')</tt>, # it's used as default :as option - # * some of the rake tasks are based on engine name, e.g. <tt>my_engine:install:migrations</tt>, - # <tt>my_engine:install:assets</tt> + # * rake task for installing migrations <tt>my_engine:install:migrations</tt> # # Engine name is set by default based on class name. For <tt>MyEngine::Engine</tt> it will be # <tt>my_engine_engine</tt>. You can change it manually using the <tt>engine_name</tt> method: diff --git a/railties/lib/rails/info_controller.rb b/railties/lib/rails/info_controller.rb index bacdcbf3aa..83ab8c7e9d 100644 --- a/railties/lib/rails/info_controller.rb +++ b/railties/lib/rails/info_controller.rb @@ -1,4 +1,4 @@ -require 'rails/application/routes_inspector' +require 'action_dispatch/routing/inspector' class Rails::InfoController < ActionController::Base self.view_paths = File.join(File.dirname(__FILE__), 'templates') @@ -16,6 +16,7 @@ class Rails::InfoController < ActionController::Base def routes inspector = Rails::Application::RoutesInspector.new + inspector = ActionDispatch::Routing::RouteInspector.new @info = inspector.format(_routes.routes).join("\n") end diff --git a/railties/lib/rails/tasks/routes.rake b/railties/lib/rails/tasks/routes.rake index 4ade825616..afc4e147e1 100644 --- a/railties/lib/rails/tasks/routes.rake +++ b/railties/lib/rails/tasks/routes.rake @@ -1,7 +1,7 @@ desc 'Print out all defined routes in match order, with names. Target specific controller with CONTROLLER=x.' task :routes => :environment do all_routes = Rails.application.routes.routes - require 'rails/application/routes_inspector' - inspector = Rails::Application::RoutesInspector.new + require 'action_dispatch/routing/inspector' + inspector = ActionDispatch::Routing::RouteInspector.new puts inspector.format(all_routes, ENV['CONTROLLER']).join "\n" end |