diff options
Diffstat (limited to 'actionpack/lib/action_controller/templates/rescues')
-rw-r--r-- | actionpack/lib/action_controller/templates/rescues/_request_and_response.rhtml | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/templates/rescues/_request_and_response.rhtml b/actionpack/lib/action_controller/templates/rescues/_request_and_response.rhtml index 30a1a05d1f..23e622a47a 100644 --- a/actionpack/lib/action_controller/templates/rescues/_request_and_response.rhtml +++ b/actionpack/lib/action_controller/templates/rescues/_request_and_response.rhtml @@ -1,6 +1,8 @@ -<% if @exception.blamed_files && !@exception.blamed_files.empty? %> - <a href="#" onclick="document.getElementById('blame_trace').style.display='block'; return false;">Show blamed files</a> - <pre id="blame_trace" style="display:none"><code><%=h @exception.describe_blame %></code></pre> +<% 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> + <% end %> + <pre id="blame_trace" <%='style="display:none"' if hide %>><code><%=h @exception.describe_blame %></code></pre> <% end %> <% if defined?(Breakpoint) %> |