From a8f07fb18518fd95fd701e8c0e550a3cd70520b0 Mon Sep 17 00:00:00 2001 From: ankonym Date: Mon, 31 Aug 2015 17:15:27 +0200 Subject: Fixes for the invite code validator Validation should only happen for new records User invite code was nil for invalid invite codes Adding missing tests --- app/models/user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/models/user.rb') diff --git a/app/models/user.rb b/app/models/user.rb index a4dd132..c0079d5 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -40,7 +40,7 @@ class User < CouchRest::Model::Base :mx_with_fallback => true - validates_with InviteCodeValidator + validates_with InviteCodeValidator, on: :create timestamps! -- cgit v1.2.3