aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorschneems <richard.schneeman@gmail.com>2011-12-17 14:23:40 -0600
committerschneems <richard.schneeman@gmail.com>2011-12-17 14:23:40 -0600
commit921dcc2570b34e48a5f3eef9e0ef3044488f81d3 (patch)
treeb9c6b217ea7c0679a7a3d142d61d43b6f65d0dbd
parent7bde2e2578ea67841409ab5ac951daa58e15474a (diff)
downloadrails-921dcc2570b34e48a5f3eef9e0ef3044488f81d3.tar.gz
rails-921dcc2570b34e48a5f3eef9e0ef3044488f81d3.tar.bz2
rails-921dcc2570b34e48a5f3eef9e0ef3044488f81d3.zip
add help text to routing error
When a newcomer hits the routing error page they are often confused about how to trouble shoot the next step. Adding a simple help text can gently remind coders where to get more help.
-rw-r--r--actionpack/lib/action_dispatch/middleware/templates/rescues/routing_error.erb21
1 files changed, 13 insertions, 8 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 ccfa858cce..f06c07daa5 100644
--- a/actionpack/lib/action_dispatch/middleware/templates/rescues/routing_error.erb
+++ b/actionpack/lib/action_dispatch/middleware/templates/rescues/routing_error.erb
@@ -1,10 +1,15 @@
<h1>Routing Error</h1>
<p><pre><%=h @exception.message %></pre></p>
-<% unless @exception.failures.empty? %><p>
- <h2>Failure reasons:</h2>
- <ol>
- <% @exception.failures.each do |route, reason| %>
- <li><code><%=h route.inspect.gsub('\\', '') %></code> failed because <%=h reason.downcase %></li>
- <% end %>
- </ol>
-</p><% end %>
+<% unless @exception.failures.empty? %>
+ <p>
+ <h2>Failure reasons:</h2>
+ <ol>
+ <% @exception.failures.each do |route, reason| %>
+ <li><code><%=h route.inspect.gsub('\\', '') %></code> failed because <%=h reason.downcase %></li>
+ <% end %>
+ </ol>
+ </p>
+<% end %>
+<p>
+ Try running <code>rake routes</code> for more information on available routes.
+</p> \ No newline at end of file