diff options
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/CHANGELOG.md | 4 | ||||
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/debug_exceptions.rb | 3 | ||||
-rw-r--r-- | actionpack/lib/action_dispatch/routing/inspector.rb | 2 | ||||
-rw-r--r-- | actionpack/test/dispatch/routing/inspector_test.rb | 4 |
4 files changed, 6 insertions, 7 deletions
diff --git a/actionpack/CHANGELOG.md b/actionpack/CHANGELOG.md index a616eaa09c..be793d905f 100644 --- a/actionpack/CHANGELOG.md +++ b/actionpack/CHANGELOG.md @@ -1,6 +1,6 @@ ## Rails 4.0.0 (unreleased) ## -* Add routes to page while debugging a RoutingError in development. *Richard Schneeman and Mattt Thompson* +* Show routes in exception page while debugging a `RoutingError` in development. *Richard Schneeman and Mattt Thompson* * Add `ActionController::Flash.add_flash_types` method to allow people to register their own flash types. e.g.: @@ -8,7 +8,7 @@ add_flash_types :error, :warning end - If you add the above code, you can use `<%= error %>` in an erb, and `rediect_to /foo, :error => 'message'` in a controller. + If you add the above code, you can use `<%= error %>` in an erb, and `redirect_to /foo, :error => 'message'` in a controller. *kennyj* diff --git a/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb b/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb index af3e6b3557..0f0589a844 100644 --- a/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb +++ b/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb @@ -83,11 +83,10 @@ module ActionDispatch @stderr_logger ||= ActiveSupport::Logger.new($stderr) end - private def formatted_routes(exception) return false unless @routes_app.respond_to?(:routes) if exception.is_a?(ActionController::RoutingError) || exception.is_a?(ActionView::Template::Error) - inspector = ActionDispatch::Routing::RouteInspector.new + inspector = ActionDispatch::Routing::RoutesInspector.new inspector.format(@routes_app.routes.routes).join("\n") end end diff --git a/actionpack/lib/action_dispatch/routing/inspector.rb b/actionpack/lib/action_dispatch/routing/inspector.rb index 17e19453ea..bc7229b6a1 100644 --- a/actionpack/lib/action_dispatch/routing/inspector.rb +++ b/actionpack/lib/action_dispatch/routing/inspector.rb @@ -62,7 +62,7 @@ module ActionDispatch ## # This class is just used for displaying route information when someone # executes `rake routes`. People should not use this class. - class RouteInspector # :nodoc: + class RoutesInspector # :nodoc: def initialize @engines = Hash.new end diff --git a/actionpack/test/dispatch/routing/inspector_test.rb b/actionpack/test/dispatch/routing/inspector_test.rb index ae830300a1..97fc4f3e4b 100644 --- a/actionpack/test/dispatch/routing/inspector_test.rb +++ b/actionpack/test/dispatch/routing/inspector_test.rb @@ -5,10 +5,10 @@ require 'action_dispatch/routing/inspector' module ActionDispatch module Routing - class RouteInspectTest < ActiveSupport::TestCase + class RoutesInspectorTest < ActiveSupport::TestCase def setup @set = ActionDispatch::Routing::RouteSet.new - @inspector = ActionDispatch::Routing::RouteInspector.new + @inspector = ActionDispatch::Routing::RoutesInspector.new app = ActiveSupport::OrderedOptions.new app.config = ActiveSupport::OrderedOptions.new app.config.assets = ActiveSupport::OrderedOptions.new |