From 0a72533b594d6e866e44adaad8b70ffa831fe9eb 2014-01-10 03:39:51 From: Toshi MARUYAMA Date: 2014-01-10 03:39:51 Subject: [PATCH] Rails4: replace deprecated Relation#update_all at IssuesController git-svn-id: http://svn.redmine.org/redmine/trunk@12580 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 7818cad..f89298c 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -310,14 +310,15 @@ class IssuesController < ApplicationController when 'destroy' # nothing to do when 'nullify' - TimeEntry.update_all('issue_id = NULL', ['issue_id IN (?)', @issues]) + TimeEntry.where(['issue_id IN (?)', @issues]).update_all('issue_id = NULL') when 'reassign' reassign_to = @project.issues.find_by_id(params[:reassign_to_id]) if reassign_to.nil? flash.now[:error] = l(:error_issue_not_found_in_project) return else - TimeEntry.update_all("issue_id = #{reassign_to.id}", ['issue_id IN (?)', @issues]) + TimeEntry.where(['issue_id IN (?)', @issues]). + update_all("issue_id = #{reassign_to.id}") end else # display the destroy form if it's a user request