diff options
author | ankonym <ankonym@gmail.com> | 2015-10-12 15:50:18 +0200 |
---|---|---|
committer | ankonym <ankonym@gmail.com> | 2015-10-13 11:48:52 +0200 |
commit | 85161c1bf4f1e830f714e8818e39d7f186914a09 (patch) | |
tree | 8dadf59aeb836dd198ca424806a254bd2dda8ae5 /lib/tasks/invite_code.rake | |
parent | d38e6ab469630b8f4e72fa859e9aaac14c3033ff (diff) |
Remove Coupon Code gem and make invite code = id
Id is set = invite code to make it easier to delete the invite codes that get created during the leap platform tests (because this avoids having to look up ttheir id each time).
Diffstat (limited to 'lib/tasks/invite_code.rake')
-rw-r--r-- | lib/tasks/invite_code.rake | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/lib/tasks/invite_code.rake b/lib/tasks/invite_code.rake index 1654599..fa397bb 100644 --- a/lib/tasks/invite_code.rake +++ b/lib/tasks/invite_code.rake @@ -11,10 +11,6 @@ task :generate_invites, [:n, :u] => :environment do |task, args| max_uses = args.u end - def generate_invite - Base64.encode64(SecureRandom.random_bytes).downcase.gsub(/[0oil1+_\/]/,'')[0..7].scan(/..../).join('-') - end - codes.times do |x| x = InviteCode.new x.max_uses = max_uses |