diff options
author | eileencodes <eileencodes@gmail.com> | 2015-08-22 12:30:58 -0400 |
---|---|---|
committer | eileencodes <eileencodes@gmail.com> | 2015-08-22 12:30:58 -0400 |
commit | f15a2609cb31d9f88c72d612b3aef186470f2dab (patch) | |
tree | 1c7f491180ed4c75d27f6e770aa69b2dadd2b009 /actionpack/lib | |
parent | 4276b214f8a13a38ac7dc4911e90d295a8e40d5a (diff) | |
download | rails-f15a2609cb31d9f88c72d612b3aef186470f2dab.tar.gz rails-f15a2609cb31d9f88c72d612b3aef186470f2dab.tar.bz2 rails-f15a2609cb31d9f88c72d612b3aef186470f2dab.zip |
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`.
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/route_set.rb | 6 |
1 files changed, 5 insertions, 1 deletions
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 |