method

check_part

rails latest stable - Class: ActionDispatch::Routing::Mapper::Mapping
check_part(name, part, path_params, hash)
public

No documentation available.

# File actionpack/lib/action_dispatch/routing/mapper.rb, line 306
          def check_part(name, part, path_params, hash)
            if part
              hash[name] = yield(part)
            else
              unless path_params.include?(name)
                message = "Missing :#{name} key on routes definition, please check your routes."
                raise ArgumentError, message
              end
            end
            hash
          end