method
add_resource_route
v3.2.8 -
Show latest stable
- Class:
Rails::Generators::ResourceRouteGenerator
add_resource_route()public
No documentation available.
# File railties/lib/rails/generators/rails/resource_route/resource_route_generator.rb, line 4
def add_resource_route
return if options[:actions].present?
route_config = regular_class_path.collect{ |namespace| "namespace :#{namespace} do " }.join(" ")
route_config << "resources :#{file_name.pluralize}"
route_config << " end" * regular_class_path.size
route route_config
end