From c4a9339e3f7e9073d5de46eea43464fae45e1eca Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 8 Jan 2014 04:57:38 +0000 Subject: [PATCH] Rails4: replace deprecated Relation#update_all at Enumeration model git-svn-id: http://svn.redmine.org/redmine/trunk@12510 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/enumeration.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/enumeration.rb b/app/models/enumeration.rb index 7e8bf5a81..128b8a9bc 100644 --- a/app/models/enumeration.rb +++ b/app/models/enumeration.rb @@ -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