summaryrefslogtreecommitdiff
path: root/app/models/invite_code_validator.rb
diff options
context:
space:
mode:
authorankonym <ankonym@gmail.com>2015-10-06 13:27:32 +0200
committerankonym <ankonym@gmail.com>2015-10-06 13:27:32 +0200
commitda9608a906d4369afb70e042069e219bc2e2d282 (patch)
treec2ae11cfa08634a758938eb7fb6ae9c55cc1378f /app/models/invite_code_validator.rb
parent6f09343e85ab23c4d81f827bbd47a720f3e2cf7b (diff)
Integrated feedback on multi-invite codes
Removing some superfluous code, mostly, and structuring tests better.
Diffstat (limited to 'app/models/invite_code_validator.rb')
-rw-r--r--app/models/invite_code_validator.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/invite_code_validator.rb b/app/models/invite_code_validator.rb
index 9dfe6fa..676e4fa 100644
--- a/app/models/invite_code_validator.rb
+++ b/app/models/invite_code_validator.rb
@@ -18,7 +18,7 @@ class InviteCodeValidator < ActiveModel::Validator
end
def has_no_uses_left?(code)
- code.invite_count >= code.invite_max_uses
+ code.invite_count >= code.max_uses
end
def add_error_to_user(error, user)