Rails4: replace deprecated Relation#update_all at Enumeration model

git-svn-id: http://svn.redmine.org/redmine/trunk@12510 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2014-01-08 04:57:38 +00:00
parent d9dc18011d
commit c4a9339e3f
1 changed files with 1 additions and 1 deletions

View File

@ -60,7 +60,7 @@ class Enumeration < ActiveRecord::Base
def check_default def check_default
if is_default? && is_default_changed? if is_default? && is_default_changed?
Enumeration.update_all({:is_default => false}, {:type => type}) Enumeration.where({:type => type}).update_all({:is_default => false})
end end
end end