]> source.dussan.org Git - redmine.git/commitdiff
remove unneeded Relation#all from Issue#workflow_rule_by_attribute
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 24 Mar 2014 16:00:01 +0000 (16:00 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 24 Mar 2014 16:00:01 +0000 (16:00 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@13000 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/issue.rb

index c8d45d7d769480945bf41623d640039d12bca071..0c4b9133ce8b2ac6d66dcea9331b360704879294 100644 (file)
@@ -524,7 +524,7 @@ class Issue < ActiveRecord::Base
     return {} if roles.empty?
 
     result = {}
-    workflow_permissions = WorkflowPermission.where(:tracker_id => tracker_id, :old_status_id => status_id, :role_id => roles.map(&:id)).all
+    workflow_permissions = WorkflowPermission.where(:tracker_id => tracker_id, :old_status_id => status_id, :role_id => roles.map(&:id))
     if workflow_permissions.any?
       workflow_rules = workflow_permissions.inject({}) do |h, wp|
         h[wp.field_name] ||= []