mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 02:31:41 +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)
|
||||
authorize site_usuarie
|
||||
|
||||
params[:invite_as] = invited_as :invite_as
|
||||
params[:invite_as] = invite_as
|
||||
|
||||
@policy = policy(site_usuarie)
|
||||
end
|
||||
|
@ -159,8 +159,12 @@ class UsuariesController < ApplicationController
|
|||
# cualquier cosa, usamos el privilegio menor.
|
||||
#
|
||||
# @return [String]
|
||||
def invited_as(param_key = :invited_as)
|
||||
Rol.role?(params[param_key]) ? params[param_key] : Rol::INVITADE
|
||||
def invited_as
|
||||
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
|
||||
|
||||
def site
|
||||
|
|
Loading…
Reference in a new issue