]> source.dussan.org Git - redmine.git/commitdiff
remove unneeded Relation#all from MemberRole model
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 27 Jan 2014 02:18:13 +0000 (02:18 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 27 Jan 2014 02:18:13 +0000 (02:18 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@12728 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/member_role.rb

index 29ad6563d324df1770619b9565ec93f0a2787ea4..896f3f2025fa36f4b613f398769408177263b924 100644 (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