##// END OF EJS Templates
Rails4: replace deprecated Relation#update_all at Repository model...
Toshi MARUYAMA -
r12218:9eaa4a7c1a41
parent child
Show More
@@ -402,7 +402,7 class Repository < ActiveRecord::Base
402 self.is_default = true
402 self.is_default = true
403 end
403 end
404 if is_default? && is_default_changed?
404 if is_default? && is_default_changed?
405 Repository.update_all(["is_default = ?", false], ["project_id = ?", project_id])
405 Repository.where(["project_id = ?", project_id]).update_all(["is_default = ?", false])
406 end
406 end
407 end
407 end
408
408
General Comments 0
You need to be logged in to leave comments. Login now