Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tag: v3.2.8.rc2
Fetching contributors…

Cannot retrieve contributors at this time

14 lines (13 sloc) 0.43 kB
module Rails
module Generators
class ResourceRouteGenerator < NamedBase
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
end
end
end
Jump to Line
Something went wrong with that request. Please try again.