summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorazul <azul@leap.se>2015-09-30 10:51:21 +0200
committerazul <azul@leap.se>2015-09-30 10:51:21 +0200
commitd45f6c61f6a13be06f1977b857e0cb31e79c5317 (patch)
treed3089b334c2663ea2fd76cf62dea853bdd57b047 /lib
parenta894966e425f27c31e7da196658c6ddee3fc3714 (diff)
parentd4f10a8d47572bcab4c44878b952146732d64d2e (diff)
Merge pull request #194 from Alster-Hamburgers/feature/invite_code
Request for feedback on invite code feature
Diffstat (limited to 'lib')
-rw-r--r--lib/tasks/invite_code.rake16
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
+