From e737f142bd102b4c464481ab685cad2a00ee022e Mon Sep 17 00:00:00 2001 From: schneems Date: Mon, 30 Apr 2012 16:29:49 -0500 Subject: [PATCH] Add backtrace to development routing error page If a user gets a routing error due to a view helper such as using user_path without an :id they must go to their logs to see the backtrace. By adding in the trace template, a user can see which line the error occurred on without leaving the browser. When a routing error occurs outside of the view the application trace will be blank and will not confuse developers. --- .../middleware/templates/rescues/routing_error.erb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 f06c07daa5..177d383e94 100644 --- a/actionpack/lib/action_dispatch/middleware/templates/rescues/routing_error.erb +++ b/actionpack/lib/action_dispatch/middleware/templates/rescues/routing_error.erb @@ -12,4 +12,6 @@ <% end %>

Try running rake routes for more information on available routes. -

\ No newline at end of file +

+ +<%= render :template => "rescues/_trace" %>