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.undef_method path_name @url_helpers_module.undef_method url_name end routes[key] = route helper = UrlHelper.create(route, route.defaults, name) define_url_helper @path_helpers_module, path_name, helper, PATH define_url_helper @url_helpers_module, url_name, helper, UNKNOWN @path_helpers << path_name @url_helpers << url_name end