Created
August 21, 2013 07:08
-
-
Save t2/6291174 to your computer and use it in GitHub Desktop.
Beta Invite Rake Task
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
namespace :beta_invites do | |
namespace :phase_one do | |
desc 'Send Phase 1 Beta Invites to testers.' | |
task :all => :environment do | |
BetaInvite.all.uniq{|b| b.email}.each do |invite| | |
unless invite.email.blank? | |
email_message = BetaInviteMail.invitation(invite.email) | |
email_message.deliver | |
end | |
end | |
end | |
desc 'Send Phase 1 Beta Invite to specified email.' | |
task :single, [:email] => :environment do |t, args| | |
email_message = BetaInviteMail.invitation(args[:email]) | |
email_message.deliver | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment