From 2f79be4654aad9ba2814f18634b1cd244d5e8608 Mon Sep 17 00:00:00 2001 From: f Date: Wed, 6 May 2020 10:52:45 -0300 Subject: [PATCH] sobre el formulario de contacto --- app/controllers/api/v1/contact_controller.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/v1/contact_controller.rb b/app/controllers/api/v1/contact_controller.rb index 08493f37..f5c55ff6 100644 --- a/app/controllers/api/v1/contact_controller.rb +++ b/app/controllers/api/v1/contact_controller.rb @@ -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