Commit 24d910a6a47ae5dc42db14f7d191516156f57523

Authored by Nathan B
2 parents 8c8f6e5b a42d9de3
Exists in master and in 1 other branch production

Merge pull request #96 from martinciu/master

Two small fixes
app/models/notice.rb
... ... @@ -91,7 +91,7 @@ class Notice
91 91 end
92 92  
93 93 def decrease_counter_cache
94   - problem.inc(:notices_count, -1)
  94 + problem.inc(:notices_count, -1) if err
95 95 end
96 96  
97 97 def unresolve_problem
... ...
app/views/apps/index.html.haml
... ... @@ -20,7 +20,7 @@
20 20 n/a
21 21 %td.count
22 22 - if app.problems.count > 0
23   - - unresolved = @unresolved_counts[app.id]
  23 + - unresolved = @unresolved_counts[app.id] || app.problems.unresolved.count
24 24 = link_to unresolved, app_path(app), :class => (unresolved == 0 ? "resolved" : nil)
25 25 - else
26 26 \-
... ...