generar correctamente los errores
This commit is contained in:
parent
c9e5cd382f
commit
d9241622b3
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue