From 4a9d04a767a82bf34f1de31edc9fa44341e61073 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Mon, 24 Mar 2014 16:00:01 +0000 Subject: [PATCH] remove unneeded Relation#all from Issue#workflow_rule_by_attribute git-svn-id: http://svn.redmine.org/redmine/trunk@13000 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/issue.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/issue.rb b/app/models/issue.rb index c8d45d7d7..0c4b9133c 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -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] ||= [] -- 2.39.5