1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

more descriptive return parameters

This commit is contained in:
Hrvoje Šimić 2012-12-26 14:17:11 +01:00
parent 0a752e88c2
commit 7731fd86b1

View file

@ -16,15 +16,14 @@ module ActionDispatch
def call(env)
begin
response = @app.call(env)
response = (_, headers, body = @app.call(env))
if response[1]['X-Cascade'] == 'pass'
body = response[2]
if headers['X-Cascade'] == 'pass'
body.close if body.respond_to?(:close)
raise ActionController::RoutingError, "No route matches [#{env['REQUEST_METHOD']}] #{env['PATH_INFO'].inspect}"
end
rescue Exception => exception
raise exception if env['action_dispatch.show_exceptions'] == false
raise exception unless env['action_dispatch.show_exceptions']
end
exception ? render_exception(env, exception) : response