From 8b9b2a0c3c8457024d99d0794416c59cb245a513 Mon Sep 17 00:00:00 2001 From: ankonym Date: Thu, 13 Aug 2015 17:24:02 +0200 Subject: Changed invite code query to look for invite_code string instead of id --- app/models/invite_code_validator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/models/invite_code_validator.rb') 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) -- cgit v1.2.3