mirror of
https://0xacab.org/sutty/sutty
synced 2025-01-19 23:23:38 +00:00
fix: tenemos un lío de singulares y plurales
This commit is contained in:
parent
df8efe800b
commit
c2fbc06d41
1 changed files with 7 additions and 3 deletions
|
@ -72,7 +72,7 @@ class UsuariesController < ApplicationController
|
||||||
site_usuarie = SiteUsuarie.new(@site, current_usuarie)
|
site_usuarie = SiteUsuarie.new(@site, current_usuarie)
|
||||||
authorize site_usuarie
|
authorize site_usuarie
|
||||||
|
|
||||||
params[:invite_as] = invited_as :invite_as
|
params[:invite_as] = invite_as
|
||||||
|
|
||||||
@policy = policy(site_usuarie)
|
@policy = policy(site_usuarie)
|
||||||
end
|
end
|
||||||
|
@ -159,8 +159,12 @@ class UsuariesController < ApplicationController
|
||||||
# cualquier cosa, usamos el privilegio menor.
|
# cualquier cosa, usamos el privilegio menor.
|
||||||
#
|
#
|
||||||
# @return [String]
|
# @return [String]
|
||||||
def invited_as(param_key = :invited_as)
|
def invited_as
|
||||||
Rol.role?(params[param_key]) ? params[param_key] : Rol::INVITADE
|
Rol.role?(params[:invited_as]) ? params[:invited_as] : Rol::INVITADE
|
||||||
|
end
|
||||||
|
|
||||||
|
def invite_as
|
||||||
|
Rol.role?(params[:invite_as].singularize) ? params[:invite_as] : Rol::INVITADE.pluralize
|
||||||
end
|
end
|
||||||
|
|
||||||
def site
|
def site
|
||||||
|
|
Loading…
Reference in a new issue