@@ -19,7 +19,7 | |||||
19 |
|
19 | |||
20 | module UsersHelper |
|
20 | module UsersHelper | |
21 | def users_status_options_for_select(selected) |
|
21 | def users_status_options_for_select(selected) | |
22 |
user_count_by_status = User. |
|
22 | user_count_by_status = User.group('status').count.to_hash | |
23 | options_for_select([[l(:label_all), ''], |
|
23 | options_for_select([[l(:label_all), ''], | |
24 | ["#{l(:status_active)} (#{user_count_by_status[1].to_i})", '1'], |
|
24 | ["#{l(:status_active)} (#{user_count_by_status[1].to_i})", '1'], | |
25 | ["#{l(:status_registered)} (#{user_count_by_status[2].to_i})", '2'], |
|
25 | ["#{l(:status_registered)} (#{user_count_by_status[2].to_i})", '2'], |
General Comments 0
You need to be logged in to leave comments.
Login now