Rails4: replace deprecated Relation#update_all at Issue model
git-svn-id: http://svn.redmine.org/redmine/trunk@12528 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
e80d9bb69a
commit
599ac20570
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue