diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/admins_controller.rb | 2 | ||||
-rw-r--r-- | app/views/admins/weekly_user_stats.haml | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/admins_controller.rb b/app/controllers/admins_controller.rb index 2ce13ca0e..badca5317 100644 --- a/app/controllers/admins_controller.rb +++ b/app/controllers/admins_controller.rb @@ -41,7 +41,7 @@ class AdminsController < Admin::AdminController @created_users_by_week[week] << u.username end - @selected_week = params[:week] || @created_users_by_week.keys.first + @selected_week = params[:week] || @created_users_by_week.keys.last @counter = @created_users_by_week[@selected_week].count end diff --git a/app/views/admins/weekly_user_stats.haml b/app/views/admins/weekly_user_stats.haml index 2a56d2b8d..61ba8edec 100644 --- a/app/views/admins/weekly_user_stats.haml +++ b/app/views/admins/weekly_user_stats.haml @@ -7,7 +7,7 @@ %div.pull-right = form_tag('/admins/weekly_user_stats', method: 'get', class: 'form-inline') do - = select_tag(:week, options_for_select(@created_users_by_week.keys), selected: @selected_week) + = select_tag(:week, options_for_select(@created_users_by_week.keys.reverse), selected: @selected_week) = submit_tag t('admins.stats.go'), class: 'btn btn-primary' = t('.amount_of', count: @counter) |