Permalink
Browse files

Merge pull request #8688 from goshakkk/error-page-toggle

Allow toggling dumps on error page
  • Loading branch information...
2 parents f83b6ed + bb932d5 commit 6e475a04bd4bc5ae65382fa6d0454b80db3a935b @guilleiguaran guilleiguaran committed Jan 2, 2013
View
@@ -1,5 +1,9 @@
## Rails 4.0.0 (unreleased) ##
+* Allow to toggle dumps on error pages.
+
+ *Gosha Arinich*
+
* Fix a bug in `content_tag_for` that prevents it for work without a block.
*Jasl*
@@ -1,6 +1,6 @@
<% unless @exception.blamed_files.blank? %>
<% if (hide = @exception.blamed_files.length > 8) %>
- <a href="#" onclick="document.getElementById('blame_trace').style.display='block'; return false;">Show blamed files</a>
+ <a href="#" onclick="s = document.getElementById('blame_trace').style; s.display = s.display == 'none' ? 'block' : 'none'; return false;">Toggle blamed files</a>
<% end %>
<pre id="blame_trace" <%='style="display:none"' if hide %>><code><%=h @exception.describe_blame %></code></pre>
<% end %>
@@ -21,12 +21,12 @@
<p><b>Parameters</b>: <pre><%=h request_dump %></pre></p>
<div class="details">
- <div class="summary"><a href="#" onclick="document.getElementById('session_dump').style.display='block'; return false;">Show session dump</a></div>
+ <div class="summary"><a href="#" onclick="s = document.getElementById('session_dump').style; s.display = s.display == 'none' ? 'block' : 'none'; return false;">Toggle session dump</a></div>
<div id="session_dump" style="display:none"><p><pre><%= debug_hash @request.session %></pre></p></div>
</div>
<div class="details">
- <div class="summary"><a href="#" onclick="document.getElementById('env_dump').style.display='block'; return false;">Show env dump</a></div>
+ <div class="summary"><a href="#" onclick="s = document.getElementById('env_dump').style; s.display=='block' ? s.display = s.display == 'none' ? 'block' : 'none'; return false;">Toggle env dump</a></div>
<div id="env_dump" style="display:none"><p><pre><%= debug_hash @request.env.slice(*@request.class::ENV_METHODS) %></pre></p></div>
</div>

0 comments on commit 6e475a0

Please sign in to comment.