class Rails::Generators::ResourceGenerator
metagenerator
def add_resource_route
def add_resource_route return if options[:actions].present? route_config = class_path.collect{|namespace| "namespace :#{namespace} do " }.join(" ") route_config << "resources :#{file_name.pluralize}" route_config << " end" * class_path.size route route_config end