class ActionDispatch::Routing::RouteSet

def self.new_with_config(config)

def self.new_with_config(config)
  route_set_config = DEFAULT_CONFIG
  # engines apparently don't have this set
  if config.respond_to? :relative_url_root
    route_set_config.relative_url_root = config.relative_url_root
  end
  if config.respond_to? :api_only
    route_set_config.api_only = config.api_only
  end
  new route_set_config
end