diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-01-27 01:08:40 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-01-27 01:08:40 +0000 |
commit | 077598fe4bb700b53e1773ff8d60b5698349b8c0 (patch) | |
tree | 5832f8a51bcd9ac2297eaf696c7c6129d21794ff /app/controllers | |
parent | dff2721fbe5276edea6f562eca89cf3aad9507a0 (diff) | |
download | redmine-077598fe4bb700b53e1773ff8d60b5698349b8c0.tar.gz redmine-077598fe4bb700b53e1773ff8d60b5698349b8c0.zip |
remove unneeded Relation#all from WorkflowsController
git-svn-id: http://svn.redmine.org/redmine/trunk@12721 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/workflows_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/workflows_controller.rb b/app/controllers/workflows_controller.rb index 5cfba3c62..d3097b095 100644 --- a/app/controllers/workflows_controller.rb +++ b/app/controllers/workflows_controller.rb @@ -79,8 +79,8 @@ class WorkflowsController < ApplicationController if @role && @tracker @fields = (Tracker::CORE_FIELDS_ALL - @tracker.disabled_core_fields).map {|field| [field, l("field_"+field.sub(/_id$/, ''))]} @custom_fields = @tracker.custom_fields - - @permissions = WorkflowPermission.where(:tracker_id => @tracker.id, :role_id => @role.id).all.inject({}) do |h, w| + @permissions = WorkflowPermission. + where(:tracker_id => @tracker.id, :role_id => @role.id).inject({}) do |h, w| h[w.old_status_id] ||= {} h[w.old_status_id][w.field_name] = w.rule h |