diff options
Diffstat (limited to 'lib/tasks')
-rw-r--r-- | lib/tasks/invite_code.rake | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/tasks/invite_code.rake b/lib/tasks/invite_code.rake new file mode 100644 index 0000000..f3bafac --- /dev/null +++ b/lib/tasks/invite_code.rake @@ -0,0 +1,16 @@ + + +desc "Generate a batch of invite codes" +task :generate_invites, [:n] => :environment do |task, args| + + codes = args.n + codes = codes.to_i + + codes.times do |x| + x = InviteCode.new + x.save + puts "#{x.invite_code} Code generated." + + end +end + |