summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-01-08 10:27:37 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-01-08 10:27:37 +0000
commit599ac20570fb98932df7e55e1e8813fb2a8b46c2 (patch)
tree200f206dc8361ae67fcba1f78e334896bf98710b /app
parente80d9bb69a82cf5cb5732cad87fe5b1905976af5 (diff)
downloadredmine-599ac20570fb98932df7e55e1e8813fb2a8b46c2.tar.gz
redmine-599ac20570fb98932df7e55e1e8813fb2a8b46c2.zip
Rails4: replace deprecated Relation#update_all at Issue model
git-svn-id: http://svn.redmine.org/redmine/trunk@12528 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/models/issue.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb
index c09b591a1..a211ef25d 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -1286,7 +1286,8 @@ class Issue < ActiveRecord::Base
# issue was just created
self.root_id = (@parent_issue.nil? ? id : @parent_issue.root_id)
set_default_left_and_right
- Issue.update_all(["root_id = ?, lft = ?, rgt = ?", root_id, lft, rgt], ["id = ?", id])
+ Issue.where(["id = ?", id]).
+ update_all(["root_id = ?, lft = ?, rgt = ?", root_id, lft, rgt])
if @parent_issue
move_to_child_of(@parent_issue)
end