From a547400b9d52cce41eee24ca303299ae1245a847 Mon Sep 17 00:00:00 2001 From: f Date: Thu, 25 Jun 2020 16:33:36 -0300 Subject: [PATCH] =?UTF-8?q?no=20instanciar=20un=20array=20vac=C3=ADo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/site.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/site.rb b/app/models/site.rb index 915097f4..1ebcba4c 100644 --- a/app/models/site.rb +++ b/app/models/site.rb @@ -114,11 +114,11 @@ class Site < ApplicationRecord end def invitade?(usuarie) - !invitades.where(id: usuarie).empty? + !invitades.find_by(id: usuarie.id).nil? end def usuarie?(usuarie) - !usuaries.where(id: usuarie).empty? + !usuaries.find_by(id: usuarie.id).nil? end # Este sitio acepta invitades?