mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-15 04:11:41 +00:00
sobre el formulario de contacto
This commit is contained in:
parent
171814f551
commit
2f79be4654
1 changed files with 5 additions and 2 deletions
|
@ -69,11 +69,14 @@ module Api
|
|||
end
|
||||
|
||||
# Realiza la inversa de Site#hostname
|
||||
#
|
||||
# TODO: El sitio sutty.nl no aplica a ninguno de estos y le
|
||||
# tuvimos que poner 'sutty.nl..sutty.nl' para pasar el test.
|
||||
def site_id
|
||||
@site_id ||= if params[:site_id].end_with? Site.domain
|
||||
params[:site_id].gsub(/\.#{Site.domain}\z/, '')
|
||||
params[:site_id].sub(/\.#{Site.domain}\z/, '')
|
||||
else
|
||||
"#{params[:site_id]}."
|
||||
params[:site_id] + '.'
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue