instance method
render_for_browser_request
Ruby on Rails edge
Since v5.1.7 Private — implementation detail, not part of the public APISignature
render_for_browser_request(request, wrapper, content_type)
No documentation comment.
Parameters
-
requestreq -
wrapperreq -
content_typereq
Source
# File actionpack/lib/action_dispatch/middleware/debug_exceptions.rb, line 80
def render_for_browser_request(request, wrapper, content_type)
template = create_template(request, wrapper)
file = "rescues/#{wrapper.rescue_template}"
if content_type == Mime[:md]
body = template.render(template: file, layout: false, formats: [:text])
format = "text/markdown"
elsif request.xhr?
body = template.render(template: file, layout: false, formats: [:text])
format = "text/plain"
else
body = template.render(template: file, layout: "rescues/layout")
format = "text/html"
end
render(wrapper.status_code, body, format)
end
Defined in actionpack/lib/action_dispatch/middleware/debug_exceptions.rb line 80
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::DebugExceptions