diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-07-04 17:58:14 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-07-04 17:58:14 +0000 |
commit | 7cdd88a6ce3632c801223b33e5ccc2b9fc13651e (patch) | |
tree | a270478d7d7626ac9970d69e32cac6c6807e6cf4 /app/models/user_preference.rb | |
parent | 22558f77094dce4d489dac410abd7b74e48cdcb0 (diff) | |
download | redmine-7cdd88a6ce3632c801223b33e5ccc2b9fc13651e.tar.gz redmine-7cdd88a6ce3632c801223b33e5ccc2b9fc13651e.zip |
Merged Rails 2.1 compatibility branch.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1623 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/user_preference.rb')
-rw-r--r-- | app/models/user_preference.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/models/user_preference.rb b/app/models/user_preference.rb index 73e4a50c6..3daa7a740 100644 --- a/app/models/user_preference.rb +++ b/app/models/user_preference.rb @@ -42,8 +42,10 @@ class UserPreference < ActiveRecord::Base if attribute_present? attr_name super else - self.others ||= {} - self.others.store attr_name, value + h = read_attribute(:others).dup || {} + h.update(attr_name => value) + write_attribute(:others, h) + value end end |