aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorschneems <richard.schneeman@gmail.com>2012-04-30 16:29:49 -0500
committerschneems <richard.schneeman@gmail.com>2012-05-02 16:01:08 -0700
commite737f142bd102b4c464481ab685cad2a00ee022e (patch)
tree105f97a6da6b48a5cac3150d3567dc1db7cfe051
parentb656134450d5d49d79ae288a537df64795e9d34d (diff)
downloadrails-e737f142bd102b4c464481ab685cad2a00ee022e.tar.gz
rails-e737f142bd102b4c464481ab685cad2a00ee022e.tar.bz2
rails-e737f142bd102b4c464481ab685cad2a00ee022e.zip
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.
-rw-r--r--actionpack/lib/action_dispatch/middleware/templates/rescues/routing_error.erb4
1 files changed, 3 insertions, 1 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 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 %>
<p>
Try running <code>rake routes</code> for more information on available routes.
-</p> \ No newline at end of file
+</p>
+
+<%= render :template => "rescues/_trace" %>