Created
January 13, 2012 17:12
-
-
Save Ravenna/1607575 to your computer and use it in GitHub Desktop.
associate method
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
| def associate_correct_user | |
| new_user = User.find_or_create_by_email self.email do |u| | |
| user = Email.find_by_email(self.email) | |
| u.first_name = user.first_name | |
| u.last_name = user.last_name | |
| u.invite! | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment