summaryrefslogtreecommitdiffstats
path: root/app/models/enumeration.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-01-08 04:57:38 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-01-08 04:57:38 +0000
commitc4a9339e3f7e9073d5de46eea43464fae45e1eca (patch)
tree9a2fa57695c30bf7f43f3423c9e979d6ccb26265 /app/models/enumeration.rb
parentd9dc18011df366e83fdd2a18489c93a0f7b142a9 (diff)
downloadredmine-c4a9339e3f7e9073d5de46eea43464fae45e1eca.tar.gz
redmine-c4a9339e3f7e9073d5de46eea43464fae45e1eca.zip
Rails4: replace deprecated Relation#update_all at Enumeration model
git-svn-id: http://svn.redmine.org/redmine/trunk@12510 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/enumeration.rb')
-rw-r--r--app/models/enumeration.rb2
1 files changed, 1 insertions, 1 deletions
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