Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
diff --git a/app/views/admins/_weekly_user_stats.haml b/app/views/admins/_weekly_user_stats.haml
index f61b04e..4ec4522 100644
--- a/app/views/admins/_weekly_user_stats.haml
+++ b/app/views/admins/_weekly_user_stats.haml
@@ -10,12 +10,12 @@
= form_tag("/admins/weekly_user_stats", method: "get", class: "form-inline week-selector row") do
.col-xs-9.center
= select_tag(:week,
- options_for_select(created_users_by_week, selected_week),
+ options_for_select(weeks, selected_week),
class: "form-control")
.col-xs-3.center
= submit_tag t("admins.stats.go"), class: "btn btn-primary"
= t(".amount_of", count: counter)
%br
-- @created_users_by_week[selected_week].each do |m|
+- created_users_by_week[selected_week].each do |m|
= link_to m, "/u/#{m}"
diff --git a/app/views/admins/weekly_user_stats.haml b/app/views/admins/weekly_user_stats.haml
index aea22eb..ac9419f 100644
--- a/app/views/admins/weekly_user_stats.haml
+++ b/app/views/admins/weekly_user_stats.haml
@@ -4,5 +4,5 @@
= render partial: "admins/admin_bar"
.col-md-9
= render partial: "admins/weekly_user_stats",
- locals: {created_users_by_week: @created_users_by_week.keys.reverse,
+ locals: {weeks: @created_users_by_week.keys.reverse, created_users_by_week: @created_users_by_week,
selected_week: @selected_week, counter: @counter}
diff --git a/app/views/admins/weekly_user_stats.mobile.haml b/app/views/admins/weekly_user_stats.mobile.haml
index 98e7edc..49996d9 100644
--- a/app/views/admins/weekly_user_stats.mobile.haml
+++ b/app/views/admins/weekly_user_stats.mobile.haml
@@ -1,2 +1,3 @@
= render partial: "admins/weekly_user_stats",
- locals: {created_users_by_week: @created_users_by_week.keys.reverse, selected_week: @selected_week, counter: @counter}
+ locals: {weeks: @created_users_by_week.keys.reverse, created_users_by_week: @created_users_by_week,
+ selected_week: @selected_week, counter: @counter}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment