diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-01-10 12:48:48 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-01-10 12:48:48 +0000 |
commit | fa544d99345fe23b51a427324266996154a02024 (patch) | |
tree | fd3a8d91ece5886767a05537c530d0c6a67e8ef6 | |
parent | 9420d7e34557130c7df7c89b078e8ab1ddde9c79 (diff) | |
download | redmine-fa544d99345fe23b51a427324266996154a02024.tar.gz redmine-fa544d99345fe23b51a427324266996154a02024.zip |
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
-rw-r--r-- | app/helpers/users_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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'], |