class ActionDispatch::Routing::RouteSet::NamedRouteCollection

def add(name, route)

def add(name, route)
  key       = name.to_sym
  path_name = :"#{name}_path"
  url_name  = :"#{name}_url"
  if routes.key? key
    @path_helpers_module.send :undef_method, path_name
    @url_helpers_module.send  :undef_method, url_name
  end
  routes[key] = route
  define_url_helper @path_helpers_module, route, path_name, route.defaults, name, PATH
  define_url_helper @url_helpers_module,  route, url_name,  route.defaults, name, UNKNOWN
  @path_helpers << path_name
  @url_helpers << url_name
end