instance method
add_resource_route
Ruby on Rails 3.1.12
Since v3.0.20 Last seen in v3.1.12Available in: v3.0.20 v3.1.12
Signature
add_resource_route()
No documentation comment.
Source
# File railties/lib/rails/generators/rails/resource/resource_generator.rb, line 17
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
Defined in railties/lib/rails/generators/rails/resource/resource_generator.rb line 17
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Rails::Generators::ResourceGenerator