From 20cf2dd0892d3d1b374d63d39d936ad60a0fb36e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Sun, 9 Aug 2015 23:15:35 -0300 Subject: Execute the block when the controller doesn't exist We should return when the contoller key is not present or if the controller doesn't exist and we didn't raised an error. --- actionpack/lib/action_dispatch/routing/route_set.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index c97c8ba0f0..8138c4ee57 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -57,6 +57,7 @@ module ActionDispatch controller_reference params.fetch(:controller) { yield } rescue NameError => e raise ActionController::RoutingError, e.message, e.backtrace if raise_on_name_error + yield end protected -- cgit v1.2.3