show http method in routing error message

This commit is contained in:
Schneems 2011-04-23 02:23:12 +08:00 committed by Aaron Patterson
parent eb599295db
commit a8870d140e

@ -50,7 +50,7 @@ def call(env)
# Only this middleware cares about RoutingError. So, let's just raise
# it here.
if headers['X-Cascade'] == 'pass'
raise ActionController::RoutingError, "No route matches #{env['PATH_INFO'].inspect}"
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