Commit eaf61fcdc8174d7f74e4ed7f565d99bcecb51751
1 parent
28a4c227
Exists in
master
and in
1 other branch
Changed default sorting
Showing
1 changed file
with
2 additions
and
3 deletions
Show diff stats
app/controllers/errs_controller.rb
| ... | ... | @@ -9,9 +9,8 @@ class ErrsController < ApplicationController |
| 9 | 9 | app_scope = current_user.admin? ? App.all : current_user.apps |
| 10 | 10 | |
| 11 | 11 | @sort = params[:sort] |
| 12 | - @order = params[:order] | |
| 13 | - @sort = "app" unless %w{message last_notice_at last_deploy_at count}.member?(@sort) | |
| 14 | - @order = "asc" unless (@order == "desc") | |
| 12 | + @sort = "last_notice_at" unless %w{app message last_notice_at last_deploy_at count}.member?(@sort) | |
| 13 | + @order = params[:order] || "desc" | |
| 15 | 14 | |
| 16 | 15 | @problems = Problem.for_apps(app_scope).in_env(params[:environment]).unresolved.ordered_by(@sort, @order) |
| 17 | 16 | @selected_problems = params[:problems] || [] | ... | ... |