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