method
call
v3.2.1 -
Show latest stable
-
0 notes -
Class: PublicExceptions
- 1.0.0
- 1.1.0
- 1.1.1
- 1.1.6
- 1.2.0
- 1.2.6
- 2.0.0
- 2.0.1
- 2.0.3
- 2.1.0
- 2.2.1
- 2.3.2
- 2.3.8
- 3.0.0
- 3.0.5
- 3.0.7
- 3.0.9
- 3.1.0
- 3.2.1 (0)
- 3.2.3 (0)
- 3.2.8 (0)
- 3.2.13 (0)
- What's this?
call(env)
public
Hide source
# File actionpack/lib/action_dispatch/middleware/public_exceptions.rb, line 10 def call(env) status = env["PATH_INFO"][1..-1] locale_path = "#{public_path}/#{status}.#{I18n.locale}.html" if I18n.locale path = "#{public_path}/#{status}.html" if locale_path && File.exist?(locale_path) render(status, File.read(locale_path)) elsif File.exist?(path) render(status, File.read(path)) else [404, { "X-Cascade" => "pass" }, []] end end


