@@ -21,12 +21,14 class UserPreference < ActiveRecord::Base | |||
|
21 | 21 | |
|
22 | 22 | attr_protected :others |
|
23 | 23 | |
|
24 | before_save :set_others_hash | |
|
25 | ||
|
24 | 26 | def initialize(attributes = nil) |
|
25 | 27 | super |
|
26 | 28 | self.others ||= {} |
|
27 | 29 | end |
|
28 | 30 | |
|
29 | def before_save | |
|
31 | def set_others_hash | |
|
30 | 32 | self.others ||= {} |
|
31 | 33 | end |
|
32 | 34 |
General Comments 0
You need to be logged in to leave comments.
Login now