From fa544d99345fe23b51a427324266996154a02024 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Fri, 10 Jan 2014 12:48:48 +0000 Subject: [PATCH] Rails4: replace deprecated Relation#count with finder options at UsersHelper#users_status_options_for_select git-svn-id: http://svn.redmine.org/redmine/trunk@12612 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/users_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb index cfec1092f..6ef6a11c7 100644 --- a/app/helpers/users_helper.rb +++ b/app/helpers/users_helper.rb @@ -19,7 +19,7 @@ module UsersHelper def users_status_options_for_select(selected) - user_count_by_status = User.count(:group => 'status').to_hash + user_count_by_status = User.group('status').count.to_hash options_for_select([[l(:label_all), ''], ["#{l(:status_active)} (#{user_count_by_status[1].to_i})", '1'], ["#{l(:status_registered)} (#{user_count_by_status[2].to_i})", '2'], -- 2.39.5