-
-
Save tenderlove/261412 to your computer and use it in GitHub Desktop.
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
ARGV.each { |email| | |
next if User.find_by_email email | |
buzz_team_users = [ '[email protected]' ] | |
user_sending_invite = buzz_team_users.rand | |
user = User.find_by_email user_sending_invite | |
invitation = Invitation.new | |
invitation.sent_to_email = email | |
invitation.sent_by_user_id = user.id | |
invitation.note = "Hey, we want you to join buzz" | |
invitation.save! | |
Notifier.deliver_invitation(user, | |
invitation.sent_to_email, | |
invitation.note, | |
invitation) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment