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:
parent
d9dc18011d
commit
c4a9339e3f
|
@ -60,7 +60,7 @@ class Enumeration < ActiveRecord::Base
|
|||
|
||||
def check_default
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in New Issue