summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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