summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorankonym <ankonym@gmail.com>2015-10-12 10:58:46 +0200
committerankonym <ankonym@gmail.com>2015-10-12 10:58:46 +0200
commitcb89699283aeb1ef4195a5c99d0319f3232f5db7 (patch)
tree55d59527553636ce60109af51426ce295559dd29 /lib
parentd1b16b0dbc868e45f4910b1b3365679b6f18562f (diff)
Adjusted the rake task with comments by @azul
Basically made the code a bit prettier :)
Diffstat (limited to 'lib')
-rw-r--r--lib/tasks/invite_code.rake6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/tasks/invite_code.rake b/lib/tasks/invite_code.rake
index 53c39b9..d6e2b49 100644
--- a/lib/tasks/invite_code.rake
+++ b/lib/tasks/invite_code.rake
@@ -6,12 +6,8 @@ task :generate_invites, [:n, :u] => :environment do |task, args|
codes = args.n
codes = codes.to_i
- if args.u == nil
- max_uses = 1
-
- elsif
+ if args.u != nil
max_uses = args.u
- max_uses = max_uses.to_i
end
codes.times do |x|