diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-01-27 02:18:30 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-01-27 02:18:30 +0000 |
commit | b6f066ddf326808f2a424356853acb9ff007abe7 (patch) | |
tree | 68dd47418ad11b5fefa162f678f1f083f58e9e04 /app | |
parent | 051ed3557b9edd82ebefec262f3bdebdb7305fd2 (diff) | |
download | redmine-b6f066ddf326808f2a424356853acb9ff007abe7.tar.gz redmine-b6f066ddf326808f2a424356853acb9ff007abe7.zip |
remove unneeded Relation#all from Project model
git-svn-id: http://svn.redmine.org/redmine/trunk@12729 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/models/project.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index e2792c4ee..5aa7f86b8 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -440,7 +440,7 @@ class Project < ActiveRecord::Base # Closes open and locked project versions that are completed def close_completed_versions Version.transaction do - versions.where(:status => %w(open locked)).all.each do |version| + versions.where(:status => %w(open locked)).each do |version| if version.completed? version.update_attribute(:status, 'closed') end @@ -480,7 +480,7 @@ class Project < ActiveRecord::Base # Returns a hash of project users grouped by role def users_by_role - members.includes(:user, :roles).all.inject({}) do |h, m| + members.includes(:user, :roles).inject({}) do |h, m| m.roles.each do |r| h[r] ||= [] h[r] << m.user |