Created
November 27, 2014 10:51
-
-
Save tlux/60a09b75e91129fba1f3 to your computer and use it in GitHub Desktop.
Representation of a User's E-Mail-Adress in RFC5322 format
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class User | |
| def full_name | |
| "#{first_name} #{last_name}" | |
| end | |
| def rfc5322 | |
| if full_name.present? | |
| %{"#{full_name}" <#{email}>} | |
| else | |
| end | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment