diff options
Diffstat (limited to 'actionpack/lib/action_dispatch/middleware/templates/rescues/routing_error.erb')
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/templates/rescues/routing_error.erb | 49 |
1 files changed, 27 insertions, 22 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 6c903d6a17..61690d3e50 100644 --- a/actionpack/lib/action_dispatch/middleware/templates/rescues/routing_error.erb +++ b/actionpack/lib/action_dispatch/middleware/templates/rescues/routing_error.erb @@ -1,25 +1,30 @@ -<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 %> -<%= render template: "rescues/_trace" %> +<header> + <h1>Routing Error</h1> +</header> +<div id="container"> + <h2><%= @exception.message %></h2> + <% unless @exception.failures.empty? %> + <p> + <h2>Failure reasons:</h2> + <ol> + <% @exception.failures.each do |route, reason| %> + <li><code><%= route.inspect.gsub('\\', '') %></code> failed because <%= reason.downcase %></li> + <% end %> + </ol> + </p> + <% end %> -<h2> - Routes -</h2> + <%= render template: "rescues/_trace" %> -<p> - Routes match in priority from top to bottom -</p> + <% if @routes_inspector %> + <h2> + Routes + </h2> -<%= render layout: "routes/route_wrapper" do %> - <%= render partial: "routes/route", collection: @routes %> -<% end %> + <p> + Routes match in priority from top to bottom + </p> + + <%= @routes_inspector.format(ActionDispatch::Routing::HtmlTableFormatter.new(self)) %> + <% end %> +</div> |