##// END OF EJS Templates
Rails4: replace deprecated Relation#update_all at IssueCategory model...
Toshi MARUYAMA -
r12256:84f43584f94b
parent child
Show More
@@ -35,7 +35,7 class IssueCategory < ActiveRecord::Base
35 # If a category is specified, issues are reassigned to this category
35 # If a category is specified, issues are reassigned to this category
36 def destroy(reassign_to = nil)
36 def destroy(reassign_to = nil)
37 if reassign_to && reassign_to.is_a?(IssueCategory) && reassign_to.project == self.project
37 if reassign_to && reassign_to.is_a?(IssueCategory) && reassign_to.project == self.project
38 Issue.update_all({:category_id => reassign_to.id}, {:category_id => id})
38 Issue.where({:category_id => id}).update_all({:category_id => reassign_to.id})
39 end
39 end
40 destroy_without_reassign
40 destroy_without_reassign
41 end
41 end
General Comments 0
You need to be logged in to leave comments. Login now