mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-26 10:06:23 +00:00
fix: permitir eliminar a le últime invitade
This commit is contained in:
parent
9ef25521eb
commit
c9bb3defff
1 changed files with 1 additions and 1 deletions
|
@ -29,7 +29,7 @@ class UsuariesController < ApplicationController
|
||||||
|
|
||||||
@usuarie = Usuarie.find(params[:id])
|
@usuarie = Usuarie.find(params[:id])
|
||||||
|
|
||||||
if @site.usuaries.count > 1
|
if @site.invitade?(@usuarie) || @site.usuaries.count > 1
|
||||||
# Mágicamente elimina el rol
|
# Mágicamente elimina el rol
|
||||||
@usuarie.sites.delete(@site)
|
@usuarie.sites.delete(@site)
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue