diff options
author | ankonym <ankonym@gmail.com> | 2015-08-13 17:24:02 +0200 |
---|---|---|
committer | ankonym <ankonym@gmail.com> | 2015-09-28 15:12:44 +0200 |
commit | 8b9b2a0c3c8457024d99d0794416c59cb245a513 (patch) | |
tree | 6156aee857998f877954c25f1b891fac227c6f1f /app | |
parent | bd98a2cbb8796039efbffb7039a9bda1cde22dae (diff) |
Changed invite code query to look for invite_code string instead of id
Diffstat (limited to 'app')
-rw-r--r-- | app/models/invite_code.rb | 2 | ||||
-rw-r--r-- | app/models/invite_code_validator.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/models/invite_code.rb b/app/models/invite_code.rb index b9f6f33..751b28e 100644 --- a/app/models/invite_code.rb +++ b/app/models/invite_code.rb @@ -4,7 +4,7 @@ class InviteCode < CouchRest::Model::Base timestamps! design do - view :by__id + view :by_invite_code end end diff --git a/app/models/invite_code_validator.rb b/app/models/invite_code_validator.rb index 55b7a74..978d3f5 100644 --- a/app/models/invite_code_validator.rb +++ b/app/models/invite_code_validator.rb @@ -7,7 +7,7 @@ class InviteCodeValidator < ActiveModel::Validator private def not_existent?(code) - InviteCode.find_by__id(code) == nil + InviteCode.find_by_invite_code(code) == nil end def add_error_to_user(error, user) |