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

def call(t, method_name, args, inner_options, url_strategy)

def call(t, method_name, args, inner_options, url_strategy)
  if args.size == arg_size && !inner_options && optimize_routes_generation?(t)
    options = t.url_options.merge @options
    path = optimized_helper(args)
    path << "/" if options[:trailing_slash] && !path.end_with?("/")
    options[:path] = path
    original_script_name = options.delete(:original_script_name)
    script_name = t._routes.find_script_name(options)
    if original_script_name
      script_name = original_script_name + script_name
    end
    options[:script_name] = script_name
    url_strategy.call options
  else
    super
  end
end