Class: UserEmail
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- UserEmail
- Defined in:
- app/models/user_email.rb
Instance Attribute Summary collapse
-
#skip_validate_email ⇒ Object
Returns the value of attribute skip_validate_email.
-
#skip_validate_unique_email ⇒ Object
Returns the value of attribute skip_validate_unique_email.
Instance Method Summary collapse
Instance Attribute Details
#skip_validate_email ⇒ Object
Returns the value of attribute skip_validate_email.
6 7 8 |
# File 'app/models/user_email.rb', line 6 def skip_validate_email @skip_validate_email end |
#skip_validate_unique_email ⇒ Object
Returns the value of attribute skip_validate_unique_email.
7 8 9 |
# File 'app/models/user_email.rb', line 7 def skip_validate_unique_email @skip_validate_unique_email end |
Instance Method Details
#normalize_email ⇒ Object
25 26 27 28 29 30 31 32 |
# File 'app/models/user_email.rb', line 25 def normalize_email self.normalized_email = if self.email.present? username, domain = self.email.split("@", 2) username = username.gsub(".", "").gsub(/\+.*/, "") "#{username}@#{domain}" end end |