From 051ed3557b9edd82ebefec262f3bdebdb7305fd2 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Mon, 27 Jan 2014 02:18:13 +0000 Subject: [PATCH] remove unneeded Relation#all from MemberRole model git-svn-id: http://svn.redmine.org/redmine/trunk@12728 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/member_role.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/member_role.rb b/app/models/member_role.rb index 29ad6563d..896f3f202 100644 --- a/app/models/member_role.rb +++ b/app/models/member_role.rb @@ -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 -- 2.39.5