Sha256: 056c8b7b58d3a51e38fcea474fa0adab034cea59715b3e15706181814738a0db
Contents?: true
Size: 430 Bytes
Versions: 28
Compression:
Stored size: 430 Bytes
Contents
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
Version data entries
28 entries across 22 versions & 5 rubygems