Class: UserPreference
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- UserPreference
- Defined in:
- app/models/user_preference.rb
Constant Summary
- VALID_EMAIL_TYPES =
["mentioned", "comment_on_post", "private_message", "started_sharing", "also_commented", "liked"]
Instance Method Summary (collapse)
Instance Method Details
- (Object) must_be_valid_email_type
14 15 16 17 18 |
# File 'app/models/user_preference.rb', line 14 def must_be_valid_email_type unless VALID_EMAIL_TYPES.include?(self.email_type) errors.add(:email_type, 'supplied mail type is not a valid or known email type') end end |