diff --git a/app/controllers/notices_controller.rb b/app/controllers/notices_controller.rb index 6bf3590..39d77c1 100644 --- a/app/controllers/notices_controller.rb +++ b/app/controllers/notices_controller.rb @@ -4,7 +4,7 @@ class NoticesController < ApplicationController def create # params[:data] if the notice came from a GET request, raw_post if it came via POST @notice = App.report_error!(params[:data] || request.raw_post) - render :xml => @notice + render :xml => @notice.to_xml(:only => false, :methods => [:id]) end # Redirects a notice to the problem page. Useful when using User Information at Airbrake gem. diff --git a/app/models/notice.rb b/app/models/notice.rb index 15357ad..fb56504 100644 --- a/app/models/notice.rb +++ b/app/models/notice.rb @@ -36,15 +36,6 @@ class Notice delegate :app, :problem, :to => :err - def to_xml(options = {}) - options[:indent] ||= 2 - xml = options[:builder] ||= ::Builder::XmlMarkup.new(:indent => options[:indent]) - xml.instruct! unless options[:skip_instruct] - xml.notice do - xml.id self.id - end - end - def user_agent agent_string = env_vars['HTTP_USER_AGENT'] agent_string.blank? ? nil : UserAgent.parse(agent_string) -- libgit2 0.21.2