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

app/controllers/workflows_controller.rb

index 5cfba3c62acfbc9ceecc39c7f46198579cae15e3..d3097b095a43b14affaec7f0bdad1c073e0687de 100644 (file)
@@ -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