def add_resource_routes(config, route_name, resource_class, path):
    """
    Add routes to the config for a resource_class and path.
    We also add a route for no method passed.
    """
    config.add_route(name=route_name, pattern='/%s/{method}' % path,
        factory=resource_class)
    config.add_route(name=route_name + '.nomethod', pattern='/%s' % path,
        factory=resource_class)
