aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/middleware/templates
diff options
context:
space:
mode:
authorByron Bischoff <byronb@gmail.com>2014-10-23 09:53:43 -0700
committerByron Bischoff <byronb@gmail.com>2014-10-23 09:53:43 -0700
commitdbcbbcf2bc58e8971672b143d1c52c0244e33f26 (patch)
treec703a1af61d38e533fa22cb636a071ad67b43612 /actionpack/lib/action_dispatch/middleware/templates
parent5a16b5cd6d35a1a8a6846f6f73d543f466a5f03f (diff)
downloadrails-dbcbbcf2bc58e8971672b143d1c52c0244e33f26.tar.gz
rails-dbcbbcf2bc58e8971672b143d1c52c0244e33f26.tar.bz2
rails-dbcbbcf2bc58e8971672b143d1c52c0244e33f26.zip
Show the user’s application in the source window and select the correct trace list, closes #17312
Diffstat (limited to 'actionpack/lib/action_dispatch/middleware/templates')
-rw-r--r--actionpack/lib/action_dispatch/middleware/templates/rescues/_source.erb2
-rw-r--r--actionpack/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb2
2 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/templates/rescues/_source.erb b/actionpack/lib/action_dispatch/middleware/templates/rescues/_source.erb
index ba29e26930..eabac3a9d2 100644
--- a/actionpack/lib/action_dispatch/middleware/templates/rescues/_source.erb
+++ b/actionpack/lib/action_dispatch/middleware/templates/rescues/_source.erb
@@ -1,7 +1,7 @@
<% if @source_extract %>
<% @source_extract.each_with_index do |extract_source, index| %>
<% if extract_source[:code] %>
- <div class="source <%="hidden" if index != 0%>" id="frame-source-<%=index%>">
+ <div class="source <%="hidden" if @show_source_idx != index%>" id="frame-source-<%=index%>">
<div class="info">
Extracted source (around line <strong>#<%= extract_source[:line_number] %></strong>):
</div>
diff --git a/actionpack/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb b/actionpack/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb
index f62caf51d7..ab57b11c7d 100644
--- a/actionpack/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb
+++ b/actionpack/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb
@@ -12,7 +12,7 @@
<% end %>
<% @traces.each do |name, trace| %>
- <div id="<%= name.gsub(/\s/, '-') %>" style="display: <%= (name == "Application Trace") ? 'block' : 'none' %>;">
+ <div id="<%= name.gsub(/\s/, '-') %>" style="display: <%= (name == @trace_to_show) ? 'block' : 'none' %>;">
<pre><code><% trace.each do |frame| %><a class="trace-frames" data-frame-id="<%= frame[:id] %>" href="#"><%= frame[:trace] %></a><br><% end %></code></pre>
</div>
<% end %>