class Rails::Generators::ResourceRouteGenerator

:nodoc:

def add_resource_route

end
end
resources :products
namespace :users do
namespace :admin do

should give you

$ bin/rails generate resource admin/users/products

Properly nests namespaces passed into a generator
:nodoc:
def add_resource_route
  return if options[:actions].present?
  route "resources :#{file_name.pluralize}", namespace: regular_class_path
end