diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-01-10 04:11:36 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-01-10 04:11:36 +0000 |
commit | ee49bdd81bc8e5606c9518d006aed03bc39eab76 (patch) | |
tree | eb8611a633c12d924de10d82457dfa8a41588599 /app/controllers/workflows_controller.rb | |
parent | efb5d5769af6e815c55ca3a2fd854660e57c3526 (diff) | |
download | redmine-ee49bdd81bc8e5606c9518d006aed03bc39eab76.tar.gz redmine-ee49bdd81bc8e5606c9518d006aed03bc39eab76.zip |
Rails4: replace deprecated find_all_by_* at WorkflowsController#copy
git-svn-id: http://svn.redmine.org/redmine/trunk@12583 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/workflows_controller.rb')
-rw-r--r-- | app/controllers/workflows_controller.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/app/controllers/workflows_controller.rb b/app/controllers/workflows_controller.rb index 06ae30e2e..24bd5c528 100644 --- a/app/controllers/workflows_controller.rb +++ b/app/controllers/workflows_controller.rb @@ -88,7 +88,6 @@ class WorkflowsController < ApplicationController end def copy - if params[:source_tracker_id].blank? || params[:source_tracker_id] == 'any' @source_tracker = nil else @@ -99,10 +98,10 @@ class WorkflowsController < ApplicationController else @source_role = Role.find_by_id(params[:source_role_id].to_i) end - - @target_trackers = params[:target_tracker_ids].blank? ? nil : Tracker.find_all_by_id(params[:target_tracker_ids]) - @target_roles = params[:target_role_ids].blank? ? nil : Role.find_all_by_id(params[:target_role_ids]) - + @target_trackers = params[:target_tracker_ids].blank? ? + nil : Tracker.where(:id => params[:target_tracker_ids]).all + @target_roles = params[:target_role_ids].blank? ? + nil : Role.where(:id => params[:target_role_ids]) if request.post? if params[:source_tracker_id].blank? || params[:source_role_id].blank? || (@source_tracker.nil? && @source_role.nil?) flash.now[:error] = l(:error_workflow_copy_source) |