Commit 258959e1 authored by Roy McKenzie's avatar Roy McKenzie

Updated Weekly User Stats page to show the most recent week. Page should show...

Updated Weekly User Stats page to show the most recent week. Page should show most recent information
parent d44300c7
......@@ -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
......
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment