def define_resources_routes
      resources = namespaces.flat_map { |n| n.resources.values }
      resources.each do |config|
        define_resource_routes(config)
      end
    end
def define_resources_routes
      resources = namespaces.flat_map { |n| n.resources.values }
      resources.each do |config|
        define_resource_routes(config)
      end
    end
Defines the routes for each resource