diff --git a/app/models/error_report.rb b/app/models/error_report.rb index 3ea4709..c8bee9c 100644 --- a/app/models/error_report.rb +++ b/app/models/error_report.rb @@ -23,8 +23,10 @@ class ErrorReport end def initialize(xml_or_attributes) - @attributes = (xml_or_attributes.is_a?(String) ? Hoptoad.parse_xml!(xml_or_attributes) : xml_or_attributes).with_indifferent_access - @attributes.each{|k, v| instance_variable_set(:"@#{k}", v) } + @attributes = xml_or_attributes + @attributes = Hoptoad.parse_xml!(@attributes) if @attributes.is_a? String + @attributes = @attributes.with_indifferent_access + @attributes.each { |k, v| instance_variable_set(:"@#{k}", v) } end def rails_env -- libgit2 0.21.2