From 0829cdfe04196bbccbbf8bb6ed6c196fdde6fda1 Mon Sep 17 00:00:00 2001 From: Nathan Broadbent Date: Mon, 28 May 2012 17:57:39 +1200 Subject: [PATCH] Renamed user_info => user_attributes --- app/models/error_report.rb | 4 ++-- app/models/notice.rb | 2 +- app/views/errs/show.html.haml | 10 +++++----- app/views/notices/_user_info.html.haml | 2 +- lib/hoptoad/v2.rb | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/models/error_report.rb b/app/models/error_report.rb index bef568a..27dba5e 100644 --- a/app/models/error_report.rb +++ b/app/models/error_report.rb @@ -2,7 +2,7 @@ require 'digest/md5' require 'hoptoad_notifier' class ErrorReport - attr_reader :klass, :message, :backtrace, :request, :server_environment, :api_key, :notifier, :user_info + attr_reader :klass, :message, :backtrace, :request, :server_environment, :api_key, :notifier, :user_attributes def initialize(xml_or_attributes) @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 :request => request, :server_environment => server_environment, :notifier => notifier, - :user_info => user_info) + :user_attributes => user_attributes) err = app.find_or_create_err!( :klass => klass, diff --git a/app/models/notice.rb b/app/models/notice.rb index 6f8140d..4ba9e05 100644 --- a/app/models/notice.rb +++ b/app/models/notice.rb @@ -10,7 +10,7 @@ class Notice field :server_environment, :type => Hash field :request, :type => Hash field :notifier, :type => Hash - field :user_info, :type => Hash + field :user_attributes, :type => Hash field :klass belongs_to :err diff --git a/app/views/errs/show.html.haml b/app/views/errs/show.html.haml index 9cae171..84bde51 100644 --- a/app/views/errs/show.html.haml +++ b/app/views/errs/show.html.haml @@ -50,8 +50,8 @@ %ul %li= link_to 'Summary', '#summary', :rel => 'summary', :class => 'button' %li= link_to 'Backtrace', '#backtrace', :rel => 'backtrace', :class => 'button' - - if @notice.user_info.present? - %li= link_to 'Application User', '#user_info', :rel => 'user_info', :class => 'button' + - if @notice.user_attributes.present? + %li= link_to 'Application User', '#user_attributes', :rel => 'user_attributes', :class => 'button' %li= link_to 'Environment', '#environment', :rel => 'environment', :class => 'button' %li= link_to 'Parameters', '#params', :rel => 'params', :class => 'button' %li= link_to 'Session', '#session', :rel => 'session', :class => 'button' @@ -65,10 +65,10 @@ %h3 Backtrace = render 'notices/backtrace', :lines => @notice.backtrace - - if @notice.user_info.present? - #user_info + - if @notice.user_attributes.present? + #user_attributes %h3 User - = render 'notices/user_info', :user => @notice.user_info + = render 'notices/user_attributes', :user => @notice.user_attributes #environment %h3 Environment diff --git a/app/views/notices/_user_info.html.haml b/app/views/notices/_user_info.html.haml index 3e1273a..5810231 100644 --- a/app/views/notices/_user_info.html.haml +++ b/app/views/notices/_user_info.html.haml @@ -1,5 +1,5 @@ .window - %table.user_info + %table.user_attributes - user.each do |user_key, user_value| %tr %th= user_key diff --git a/lib/hoptoad/v2.rb b/lib/hoptoad/v2.rb index ad77409..1087360 100644 --- a/lib/hoptoad/v2.rb +++ b/lib/hoptoad/v2.rb @@ -59,7 +59,7 @@ module Hoptoad :api_key => notice['api-key'], :notifier => notice['notifier'], - :user_info => notice['user-info'] || {} + :user_attributes => notice['user-attributes'] || {} } end end -- libgit2 0.21.2