##// END OF EJS Templates
Rails4: replace deprecated Relation#count with finder options at UsersHelper#users_status_options_for_select...
Toshi MARUYAMA -
r12337:fa544d99345f
parent child
Show More
@@ -19,7 +19,7
19 19
20 20 module UsersHelper
21 21 def users_status_options_for_select(selected)
22 user_count_by_status = User.count(:group => 'status').to_hash
22 user_count_by_status = User.group('status').count.to_hash
23 23 options_for_select([[l(:label_all), ''],
24 24 ["#{l(:status_active)} (#{user_count_by_status[1].to_i})", '1'],
25 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