diff --git a/app/controllers/apps_controller.rb b/app/controllers/apps_controller.rb index b59902f..4bde84a 100644 --- a/app/controllers/apps_controller.rb +++ b/app/controllers/apps_controller.rb @@ -61,12 +61,10 @@ class AppsController < InheritedResources::Base end # Sort apps by number of unresolved errs, then problem counts. - apps.sort! do |a,b| + apps.sort do |a,b| unresolved = @unresolved_counts[b.id] <=> @unresolved_counts[a.id] unresolved != 0 ? unresolved : @problem_counts[b.id] <=> @problem_counts[a.id] end - - apps end end diff --git a/app/views/apps/index.html.haml b/app/views/apps/index.html.haml index dc9923b..f3e05b6 100644 --- a/app/views/apps/index.html.haml +++ b/app/views/apps/index.html.haml @@ -36,7 +36,7 @@ = link_to( app.last_deploy_at.to_s(:micro) << (revision.present? ? " (#{revision})" : ""), app_deploys_path(app)) %td.count - if @problem_counts[app.id] > 0 - - unresolved = @unresolved_counts[app.id] || app.problems.unresolved.count + - unresolved = @unresolved_counts[app.id] = link_to unresolved, app_path(app), :class => (unresolved == 0 ? "resolved" : nil) - if @apps.none? %tr -- libgit2 0.21.2