diff options
author | Kir Shatrov <shatrov@me.com> | 2013-08-21 16:42:04 +0400 |
---|---|---|
committer | Kir Shatrov <shatrov@me.com> | 2013-08-22 22:20:34 +0400 |
commit | a725a453b38057b46878afae39dc107ada2cf326 (patch) | |
tree | 7fca3f5d7bf97e4110c4b05a533f371b10af047c /actionpack/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb | |
parent | 998d9c89e42d41f99b1970ce229cc4b818db3680 (diff) | |
download | rails-a725a453b38057b46878afae39dc107ada2cf326.tar.gz rails-a725a453b38057b46878afae39dc107ada2cf326.tar.bz2 rails-a725a453b38057b46878afae39dc107ada2cf326.zip |
Display exceptions in text format for xhr request
Diffstat (limited to 'actionpack/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb')
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb b/actionpack/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb new file mode 100644 index 0000000000..7e9cedb95e --- /dev/null +++ b/actionpack/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb @@ -0,0 +1,30 @@ +<header> + <h1>Routing Error</h1> +</header> +<div id="container"> + <h2><%= h @exception.message %></h2> + <% unless @exception.failures.empty? %> + <p> + <h2>Failure reasons:</h2> + <ol> + <% @exception.failures.each do |route, reason| %> + <li><code><%= route.inspect.delete('\\') %></code> failed because <%= reason.downcase %></li> + <% end %> + </ol> + </p> + <% end %> + + <%= render template: "rescues/_trace" %> + + <% if @routes_inspector %> + <h2> + Routes + </h2> + + <p> + Routes match in priority from top to bottom + </p> + + <%= @routes_inspector.format(ActionDispatch::Routing::HtmlTableFormatter.new(self)) %> + <% end %> +</div> |