aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/info_controller.rb
diff options
context:
space:
mode:
authorschneems <richard.schneeman@gmail.com>2012-12-17 14:26:46 -0600
committerschneems <richard.schneeman@gmail.com>2012-12-17 15:59:15 -0600
commit37d9c44b6d15cc0b02f327fe51687db7d0443bb8 (patch)
treec3eabd15698fc17805901ca7591013d3513d1462 /railties/lib/rails/info_controller.rb
parent504ed9095810c40b0967802dfbdd347c7e3a4e89 (diff)
downloadrails-37d9c44b6d15cc0b02f327fe51687db7d0443bb8.tar.gz
rails-37d9c44b6d15cc0b02f327fe51687db7d0443bb8.tar.bz2
rails-37d9c44b6d15cc0b02f327fe51687db7d0443bb8.zip
Format routes as html on debug page
When someone gets a routing exception, the routes are rendered (starting in Rails 4.0). This PR brings parity between the html routes in the `rails/info/routes` path and when rendered from an exception. This is the continuation of #8521 which brought html formatted routes. In addition to bringing parity to the two views, we're keeping our views DRY by rendering off of the same partials. In this case Railties depends on partials provided by ActionDispatch. I'm open to alternative implementations. Ideally both views will use the same code so any improvements or updates to it will be reproduced on both. <hr /> ![](http://f.cl.ly/items/3O1D0K1v0j0i343O3T3T/Screen%20Shot%202012-12-17%20at%203.07.20%20PM.png)
Diffstat (limited to 'railties/lib/rails/info_controller.rb')
-rw-r--r--railties/lib/rails/info_controller.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/railties/lib/rails/info_controller.rb b/railties/lib/rails/info_controller.rb
index ec7d5ed610..e650f58d20 100644
--- a/railties/lib/rails/info_controller.rb
+++ b/railties/lib/rails/info_controller.rb
@@ -2,6 +2,7 @@ require 'action_dispatch/routing/inspector'
class Rails::InfoController < ActionController::Base # :nodoc:
self.view_paths = File.expand_path('../templates', __FILE__)
+ prepend_view_path ActionDispatch::DebugExceptions::RESCUES_TEMPLATE_PATH
layout 'application'
before_filter :require_local!