Skip to content

Instantly share code, notes, and snippets.

@swilk
Created December 22, 2009 01:08
Show Gist options
  • Save swilk/261411 to your computer and use it in GitHub Desktop.
Save swilk/261411 to your computer and use it in GitHub Desktop.
ARGV.each { |email|
buzz_team_users = [ '[email protected]' ]
user_sending_invite = buzz_team_users.rand
next if User.find_by_email email
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