Commit 0829cdfe04196bbccbbf8bb6ed6c196fdde6fda1

Authored by Nathan Broadbent
1 parent db790674
Exists in master and in 1 other branch production

Renamed user_info => user_attributes

app/models/error_report.rb
... ... @@ -2,7 +2,7 @@ require 'digest/md5'
2 2 require 'hoptoad_notifier'
3 3  
4 4 class ErrorReport
5   - attr_reader :klass, :message, :backtrace, :request, :server_environment, :api_key, :notifier, :user_info
  5 + attr_reader :klass, :message, :backtrace, :request, :server_environment, :api_key, :notifier, :user_attributes
6 6  
7 7 def initialize(xml_or_attributes)
8 8 @attributes = (xml_or_attributes.is_a?(String) ? Hoptoad.parse_xml!(xml_or_attributes) : xml_or_attributes).with_indifferent_access
... ... @@ -36,7 +36,7 @@ class ErrorReport
36 36 :request => request,
37 37 :server_environment => server_environment,
38 38 :notifier => notifier,
39   - :user_info => user_info)
  39 + :user_attributes => user_attributes)
40 40  
41 41 err = app.find_or_create_err!(
42 42 :klass => klass,
... ...
app/models/notice.rb
... ... @@ -10,7 +10,7 @@ class Notice
10 10 field :server_environment, :type => Hash
11 11 field :request, :type => Hash
12 12 field :notifier, :type => Hash
13   - field :user_info, :type => Hash
  13 + field :user_attributes, :type => Hash
14 14 field :klass
15 15  
16 16 belongs_to :err
... ...
app/views/errs/show.html.haml
... ... @@ -50,8 +50,8 @@
50 50 %ul
51 51 %li= link_to 'Summary', '#summary', :rel => 'summary', :class => 'button'
52 52 %li= link_to 'Backtrace', '#backtrace', :rel => 'backtrace', :class => 'button'
53   - - if @notice.user_info.present?
54   - %li= link_to 'Application User', '#user_info', :rel => 'user_info', :class => 'button'
  53 + - if @notice.user_attributes.present?
  54 + %li= link_to 'Application User', '#user_attributes', :rel => 'user_attributes', :class => 'button'
55 55 %li= link_to 'Environment', '#environment', :rel => 'environment', :class => 'button'
56 56 %li= link_to 'Parameters', '#params', :rel => 'params', :class => 'button'
57 57 %li= link_to 'Session', '#session', :rel => 'session', :class => 'button'
... ... @@ -65,10 +65,10 @@
65 65 %h3 Backtrace
66 66 = render 'notices/backtrace', :lines => @notice.backtrace
67 67  
68   - - if @notice.user_info.present?
69   - #user_info
  68 + - if @notice.user_attributes.present?
  69 + #user_attributes
70 70 %h3 User
71   - = render 'notices/user_info', :user => @notice.user_info
  71 + = render 'notices/user_attributes', :user => @notice.user_attributes
72 72  
73 73 #environment
74 74 %h3 Environment
... ...
app/views/notices/_user_info.html.haml
1 1 .window
2   - %table.user_info
  2 + %table.user_attributes
3 3 - user.each do |user_key, user_value|
4 4 %tr
5 5 %th= user_key
... ...
lib/hoptoad/v2.rb
... ... @@ -59,7 +59,7 @@ module Hoptoad
59 59  
60 60 :api_key => notice['api-key'],
61 61 :notifier => notice['notifier'],
62   - :user_info => notice['user-info'] || {}
  62 + :user_attributes => notice['user-attributes'] || {}
63 63 }
64 64 end
65 65 end
... ...