class ActionDispatch::Routing::RouteSet::NamedRouteCollection::UrlHelper::OptimizedUrlHelper

def raise_generation_error(args)

def raise_generation_error(args)
  missing_keys = []
  params = parameterize_args(args) { |missing_key|
    missing_keys << missing_key
  }
  constraints = Hash[@route.requirements.merge(params).sort_by { |k, v| k.to_s }]
  message = +"No route matches #{constraints.inspect}"
  message << ", missing required keys: #{missing_keys.sort.inspect}"
  raise ActionController::UrlGenerationError, message
end