diff options
Diffstat (limited to 'app/models')
-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) |