-
Notifications
You must be signed in to change notification settings - Fork 21.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fe12e46
commit 048cd25
Showing
6 changed files
with
150 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 21 additions & 4 deletions
25
actionpack/lib/action_dispatch/middleware/templates/rescues/_source.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,8 +1,25 @@ | |||
<% if @source_extract %> | <% if @source_extract %> | ||
Extracted source (around line <strong>#<%= @line_number %></strong>): | <div class="source"> | ||
<div class="info"> | |||
Extracted source (around line <strong>#<%= @line_number %></strong>): | |||
</div> | |||
<div class="data"> | |||
<table cellpadding="0" cellspacing="0" class="lines"> | |||
<tr> | |||
<td> | |||
<pre class="line_numbers"> | |||
<% @source_extract.keys.each do |line_number| %> | |||
<span><%= line_number -%></span> | |||
<% end %> | |||
</pre> | |||
</td> | |||
<td width="100%"> | |||
<pre> | <pre> | ||
<% @source_extract.each do |line, source| %> | <% @source_extract.each do |line, source| -%><div class="line<%= " active" if line == @line_number -%>"><%= source -%></div><% end -%> | ||
<%= "#{(@line_number == line) ? "> " : " "}#{line}: #{source}" -%> | |||
<% end %> | |||
</pre> | </pre> | ||
</td> | |||
</tr> | |||
</table> | |||
</div> | |||
</div> | |||
<% end %> | <% end %> |
25 changes: 15 additions & 10 deletions
25
actionpack/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,11 +1,16 @@ | |||
<h1> | <header> | ||
<%=h @exception.class.to_s %> | <h1> | ||
<% if @request.parameters['controller'] %> | <%=h @exception.class.to_s %> | ||
in <%=h @request.parameters['controller'].camelize %>Controller<% if @request.parameters['action'] %>#<%=h @request.parameters['action'] %><% end %> | <% if @request.parameters['controller'] %> | ||
<% end %> | in <%=h @request.parameters['controller'].camelize %>Controller<% if @request.parameters['action'] %>#<%=h @request.parameters['action'] %><% end %> | ||
</h1> | <% end %> | ||
<pre><%=h @exception.message %></pre> | </h1> | ||
</header> | |||
|
|
||
<%= render template: "rescues/_source" %> | <div id="container"> | ||
<%= render template: "rescues/_trace" %> | <h2><%=h @exception.message %></h2> | ||
<%= render template: "rescues/_request_and_response" %> |
|
||
<%= render template: "rescues/_source" %> | |||
<%= render template: "rescues/_trace" %> | |||
<%= render template: "rescues/_request_and_response" %> | |||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 7 additions & 2 deletions
9
actionpack/lib/action_dispatch/middleware/templates/rescues/missing_template.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,2 +1,7 @@ | |||
<h1>Template is missing</h1> | <header> | ||
<p><%=h @exception.message %></p> | <h1>Template is missing</h1> | ||
</header> | |||
|
|||
<div id="container"> | |||
<h2><%=h @exception.message %></h2> | |||
</div> |
8 changes: 6 additions & 2 deletions
8
actionpack/lib/action_dispatch/middleware/templates/rescues/unknown_action.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,2 +1,6 @@ | |||
<h1>Unknown action</h1> | <header> | ||
<p><%=h @exception.message %></p> | <h1>Unknown action</h1> | ||
</header> | |||
<div id="container"> | |||
<h2><%=h @exception.message %></h2> | |||
</div> | |||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong. |
@guilleiguaran wrong indentation here.