Commit 64aebf9f67f42a76865a64f33a77524edace1f19

Authored by Sergey Nartimov
1 parent 6ab0e1ff
Exists in master and in 1 other branch production

remove duplication

Showing 1 changed file with 1 additions and 3 deletions   Show diff stats
app/models/notice.rb
@@ -13,7 +13,7 @@ class Notice @@ -13,7 +13,7 @@ class Notice
13 field :current_user, :type => Hash 13 field :current_user, :type => Hash
14 field :error_class 14 field :error_class
15 delegate :lines, :to => :backtrace, :prefix => true 15 delegate :lines, :to => :backtrace, :prefix => true
16 - delegate :app, :to => :err 16 + delegate :app, :problem, :to => :err
17 17
18 belongs_to :err 18 belongs_to :err
19 belongs_to :backtrace, :index => true 19 belongs_to :backtrace, :index => true
@@ -36,8 +36,6 @@ class Notice @@ -36,8 +36,6 @@ class Notice
36 scope :reverse_ordered, order_by(:created_at.desc) 36 scope :reverse_ordered, order_by(:created_at.desc)
37 scope :for_errs, lambda {|errs| where(:err_id.in => errs.all.map(&:id))} 37 scope :for_errs, lambda {|errs| where(:err_id.in => errs.all.map(&:id))}
38 38
39 - delegate :app, :problem, :to => :err  
40 -  
41 def user_agent 39 def user_agent
42 agent_string = env_vars['HTTP_USER_AGENT'] 40 agent_string = env_vars['HTTP_USER_AGENT']
43 agent_string.blank? ? nil : UserAgent.parse(agent_string) 41 agent_string.blank? ? nil : UserAgent.parse(agent_string)