5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-26 01:16:23 +00:00

fix: permitir eliminar a le últime invitade

This commit is contained in:
f 2024-09-06 13:31:54 -03:00
parent 9ef25521eb
commit c9bb3defff
No known key found for this signature in database

View file

@ -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