remove unneeded Relation#all from MemberRole model

git-svn-id: http://svn.redmine.org/redmine/trunk@12728 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2014-01-27 02:18:13 +00:00
parent 3b3a7c50a9
commit 051ed3557b
1 changed files with 2 additions and 1 deletions

View File

@ -64,7 +64,8 @@ class MemberRole < ActiveRecord::Base
end
def remove_inherited_roles
MemberRole.where(:inherited_from => id).all.group_by(&:member).each do |member, member_roles|
MemberRole.where(:inherited_from => id).group_by(&:member).
each do |member, member_roles|
member_roles.each(&:destroy)
end
end