From d9241622b32436b0dfe15bec83dea6df82a808b4 Mon Sep 17 00:00:00 2001 From: f Date: Mon, 2 Nov 2020 19:43:55 -0300 Subject: [PATCH] generar correctamente los errores --- app/controllers/sites_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/sites_controller.rb b/app/controllers/sites_controller.rb index d6fa37c..dcb2953 100644 --- a/app/controllers/sites_controller.rb +++ b/app/controllers/sites_controller.rb @@ -113,11 +113,11 @@ class SitesController < ApplicationController file = params.require(:file) + '.' + params.require(:format) - raise ActionController::RoutingError unless file.start_with? 'public/' + raise ActionController::RoutingError.new(nil, nil) unless file.start_with? 'public/' path = site.relative_path file - raise ActionController::RoutingError unless File.exist? path + raise ActionController::RoutingError.new(nil, nil) unless File.exist? path # TODO: Hacer esto usa recursos, pero menos que generar el sitio # cada vez. Para poder usar X-Accel tendrĂ­amos que montar los