From c9bb3defff8f1ed7d77dc15812fa64743eeb533a Mon Sep 17 00:00:00 2001 From: f Date: Fri, 6 Sep 2024 13:31:54 -0300 Subject: [PATCH] =?UTF-8?q?fix:=20permitir=20eliminar=20a=20le=20=C3=BAlti?= =?UTF-8?q?me=20invitade?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/usuaries_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/usuaries_controller.rb b/app/controllers/usuaries_controller.rb index 6924c860..cba349c5 100644 --- a/app/controllers/usuaries_controller.rb +++ b/app/controllers/usuaries_controller.rb @@ -29,7 +29,7 @@ class UsuariesController < ApplicationController @usuarie = Usuarie.find(params[:id]) - if @site.usuaries.count > 1 + if @site.invitade?(@usuarie) || @site.usuaries.count > 1 # Mágicamente elimina el rol @usuarie.sites.delete(@site) else