method

call

Importance_0
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: ActionDispatch::Routing::RouteSet::Dispatcher

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v4.1.8) is shown here.

These similar methods exist in v7.1.3.2:

call(env) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionpack/lib/action_dispatch/routing/route_set.rb, line 30
        def call(env)
          params = env[PARAMETERS_KEY]

          # If any of the path parameters has an 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
Register or log in to add new notes.