method
call
v4.0.2 -
Show latest stable
- Class:
ActionDispatch::Routing::RouteSet::Dispatcher
call(env)public
No documentation available.
# File actionpack/lib/action_dispatch/routing/route_set.rb, line 28
def call(env)
params = env[PARAMETERS_KEY]
# If any of the path parameters has a invalid encoding then
# raise since it's likely to trigger errors further on.
params.each do |key, value|
next unless value.respond_to?(:valid_encoding?)
unless value.valid_encoding?
raise ActionController::BadRequest, "Invalid parameter: #{key} => #{value}"
end
end
prepare_params!(params)
# Just raise undefined constant errors if a controller was specified as default.
unless controller = controller(params, @defaults.key?(:controller))
return [404, {'X-Cascade' => 'pass'}, []]
end
dispatch(controller, params[:action], env)
end