summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-12-04 06:44:39 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-12-04 06:44:39 +0000
commit32ed138c532970c24d11d9ad8589599cadc84470 (patch)
treeb4181a247097330a3972f734dd11b4ba5de8ac24
parent420e70180c8947a39a15ce14ba5946ddbf824635 (diff)
downloadredmine-32ed138c532970c24d11d9ad8589599cadc84470.tar.gz
redmine-32ed138c532970c24d11d9ad8589599cadc84470.zip
Rails3: model: replace deprecated before_save method at UserPreference model
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8070 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/models/user_preference.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/models/user_preference.rb b/app/models/user_preference.rb
index 040efb994..b2da867a3 100644
--- a/app/models/user_preference.rb
+++ b/app/models/user_preference.rb
@@ -21,12 +21,14 @@ class UserPreference < ActiveRecord::Base
attr_protected :others
+ before_save :set_others_hash
+
def initialize(attributes = nil)
super
self.others ||= {}
end
- def before_save
+ def set_others_hash
self.others ||= {}
end