Skip to content

Commit

Permalink
More DQM fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtOfCode- committed Mar 4, 2018
1 parent 55644ea commit 7fdf302
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/controllers/dashboard_controller.rb
Expand Up @@ -54,15 +54,15 @@ def site_dash

@spammers = StackExchangeUser.joins(:feedbacks).where(site: @site, still_alive: true)
.where("feedbacks.feedback_type LIKE '%t%'").group('stack_exchange_users.id')
.order('(stack_exchange_users.question_count + stack_exchange_users.answer_count) DESC'\
', stack_exchange_users.reputation DESC')
.order(Arel.sql('(stack_exchange_users.question_count + stack_exchange_users.answer_count) DESC'\
', stack_exchange_users.reputation DESC'))

@spammers_page = @spammers.paginate(per_page: 50, page: params[:page])

@autoflaggers = User.joins(:flag_logs)
.where(flag_logs: { site: @site, success: true, is_auto: true })
.group(:user_id)
.order('COUNT(flag_logs.id) DESC')
.order(Arel.sql('COUNT(flag_logs.id) DESC'))

@autoflaggers_page = @autoflaggers.paginate(per_page: 50, page: params[:page])

Expand Down

0 comments on commit 7fdf302

Please sign in to comment.