diff options
author | schneems <richard.schneeman@gmail.com> | 2012-06-09 14:54:49 -0500 |
---|---|---|
committer | schneems <richard.schneeman@gmail.com> | 2012-07-07 15:38:29 -0500 |
commit | fa714ec7dffd12b8508c756e6526eff5ae8e4202 (patch) | |
tree | 4a1307d0ae5ac6af0ee40a3c8f8fc118535cdb78 /actionpack/lib/action_dispatch/middleware/templates | |
parent | ee20be7c33538e6e9d334ddbd16d427190c7ff00 (diff) | |
download | rails-fa714ec7dffd12b8508c756e6526eff5ae8e4202.tar.gz rails-fa714ec7dffd12b8508c756e6526eff5ae8e4202.tar.bz2 rails-fa714ec7dffd12b8508c756e6526eff5ae8e4202.zip |
show routes while debugging RoutingError
If someone receives a routing error, they likely need to view the routes. Rather than making them visit '/rails/info/routes' or run `rake routes` we can give them that information on the page.
Diffstat (limited to 'actionpack/lib/action_dispatch/middleware/templates')
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/templates/rescues/routing_error.erb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/templates/rescues/routing_error.erb b/actionpack/lib/action_dispatch/middleware/templates/rescues/routing_error.erb index 177d383e94..8c594c1523 100644 --- a/actionpack/lib/action_dispatch/middleware/templates/rescues/routing_error.erb +++ b/actionpack/lib/action_dispatch/middleware/templates/rescues/routing_error.erb @@ -10,8 +10,14 @@ </ol> </p> <% end %> +<%= render :template => "rescues/_trace" %> + +<h2> + Routes +</h2> + <p> - Try running <code>rake routes</code> for more information on available routes. + Routes match in priority from top to bottom </p> -<%= render :template => "rescues/_trace" %> +<p><pre><%= @routes %></pre></p> |