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:
parent
3b3a7c50a9
commit
051ed3557b
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue