From 5a18b853ed9b04cf7d610390fab7de13cc23108e Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Sat, 8 Aug 2015 17:12:50 -0700 Subject: remove useless conditional `prepare_params!` would raise an exception if `params` wasn't initialized, so it must always be available. Remove the existence conditional from the `controller` method. --- actionpack/lib/action_dispatch/routing/route_set.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index d58293d93b..dd78b9d4fd 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -54,7 +54,7 @@ module ActionDispatch # delegate the control back to Rack cascade. Besides, if this is not a default # controller, it means we should respect the @scope[:module] parameter. def controller(params, raise_on_name_error=true) - if params && params.key?(:controller) + if params.key?(:controller) controller_param = params[:controller] controller_reference(controller_param) else -- cgit v1.2.3