Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make the session dump less verbose, and make the model inspector outp…

…ut more compact
  • Loading branch information...
commit cf0a564da6da6e5675c92bb3275db1f35d7035b3 1 parent a47be04
Jamis Buck jamis authored
2  views/exception_notifier/_inspect_model.rhtml
View
@@ -3,7 +3,7 @@
<% attrs = inspect_model.attributes -%>
<% max = attrs.keys.max { |a,b| a.length <=> b.length } -%>
<% attrs.keys.sort.each do |attr| -%>
-* <%= "%*-s: %s" % [max.length, attr, object_to_yaml(attrs[attr]).gsub(/\n/, "\n ")] %>
+* <%= "%*-s: %s" % [max.length, attr, object_to_yaml(attrs[attr]).gsub(/\n/, "\n ").strip] %>
<% end -%>
<% end -%>
6 views/exception_notifier/_session.rhtml
View
@@ -1,4 +1,2 @@
-<% for variable in @request.session.instance_variables -%>
-<% next if variable =~ /^@db/ -%>
-* <%= variable %>: <%= PP.pp(@request.session.instance_variable_get(variable),"").gsub(/\n/, "\n ").strip %>
-<% end -%>
+* session id: <%= @request.session.instance_variable_get(:@session_id).inspect %>
+* data: <%= PP.pp(@request.session.instance_variable_get(:@data),"").gsub(/\n/, "\n ").strip %>
Please sign in to comment.
Something went wrong with that request. Please try again.