From f15a2609cb31d9f88c72d612b3aef186470f2dab Mon Sep 17 00:00:00 2001 From: eileencodes Date: Sat, 22 Aug 2015 12:30:58 -0400 Subject: Fix Railties test failure for asset routes Since none of the action pack tests failed without this conditional it didn't seem necessary. This fixes the build because it correctly returns a 404 instead of a 500 for the asset routes test. Test that was failing was in the `assets_test.rb` file and was the test named `test_assets_routes_are_not_drawn_when_compilation_is_disabled`. --- actionpack/lib/action_dispatch/routing/route_set.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'actionpack/lib/action_dispatch') diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index 35385a5d9b..af6f0de556 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -33,7 +33,11 @@ module ActionDispatch end dispatch(controller, params[:action], req) rescue NameError => e - raise ActionController::RoutingError, e.message, e.backtrace if @raise_on_name_error + if @raise_on_name_error + raise ActionController::RoutingError, e.message, e.backtrace + else + return [404, {'X-Cascade' => 'pass'}, []] + end end protected -- cgit v1.2.3