summaryrefslogtreecommitdiff
path: root/app/models/user.rb
diff options
context:
space:
mode:
authorankonym <ankonym@gmail.com>2015-08-25 14:11:00 +0200
committerankonym <ankonym@gmail.com>2015-09-28 15:12:45 +0200
commit45c3fadd930a474951bd918a50e1ea2b00af75c7 (patch)
tree3439fc94cc8e6533a92d06a2fd751a3804e71050 /app/models/user.rb
parent5f9aec72f124a971b765c14052363f3ce1e16c65 (diff)
Make sure codes can only be used once, fix validations
We introduced a count on invite codes to make sure that (at the moment) codes can only be used once. (The code will also allow multi-use codes in the future.) Also, some of our validations weren't validating against the correct data, which is now fixed.
Diffstat (limited to 'app/models/user.rb')
-rw-r--r--app/models/user.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 06e1a0f..a4dd132 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -39,8 +39,10 @@ class User < CouchRest::Model::Base
:email => true,
:mx_with_fallback => true
+
validates_with InviteCodeValidator
+
timestamps!
design do