aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/routing
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2015-08-25 15:50:38 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2015-08-25 15:50:50 -0700
commit702965c1b724852afb08e93df64dd65dbcf762d4 (patch)
treea34292d944657e68537bddac9b80a98507268f3c /actionpack/lib/action_dispatch/routing
parentfa54f58733d0e3dbf8572684f6fe0b00ae38c39b (diff)
downloadrails-702965c1b724852afb08e93df64dd65dbcf762d4.tar.gz
rails-702965c1b724852afb08e93df64dd65dbcf762d4.tar.bz2
rails-702965c1b724852afb08e93df64dd65dbcf762d4.zip
always return a controller class from the `controller_class` method
now the caller can just treat it like a regular controller even though it will return a 404
Diffstat (limited to 'actionpack/lib/action_dispatch/routing')
-rw-r--r--actionpack/lib/action_dispatch/routing/route_set.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb
index 4e29476117..065df09f8b 100644
--- a/actionpack/lib/action_dispatch/routing/route_set.rb
+++ b/actionpack/lib/action_dispatch/routing/route_set.rb
@@ -28,9 +28,7 @@ module ActionDispatch
def serve(req)
params = req.path_parameters
- controller = req.controller_class do
- return [404, {'X-Cascade' => 'pass'}, []]
- end
+ controller = req.controller_class
dispatch(controller, params[:action], req)
rescue NameError => e
if @raise_on_name_error