Commit c48b131b86da8b26e10b0f631847ac5aa430b951
1 parent
aae95783
Exists in
master
and in
1 other branch
Added :notices index to Err
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
app/models/err.rb
... | ... | @@ -15,6 +15,7 @@ class Err |
15 | 15 | |
16 | 16 | index :last_notice_at |
17 | 17 | index :app_id |
18 | + index :notices | |
18 | 19 | |
19 | 20 | belongs_to :app |
20 | 21 | has_many :notices |
... | ... | @@ -26,7 +27,7 @@ class Err |
26 | 27 | scope :unresolved, where(:resolved => false) |
27 | 28 | scope :ordered, order_by(:last_notice_at.desc) |
28 | 29 | scope :for_apps, lambda {|apps| where(:app_id.in => apps.all.map(&:id))} |
29 | - | |
30 | + | |
30 | 31 | def self.in_env(env) |
31 | 32 | env.present? ? where(:environment => env) : scoped |
32 | 33 | end | ... | ... |