Class: Rails::Generators::ActiveScaffoldGenerator
- Inherits:
-
ResourceGenerator
- Object
- ResourceGenerator
- Rails::Generators::ActiveScaffoldGenerator
- Defined in:
- lib/generators/active_scaffold/active_scaffold_generator.rb
Overview
metagenerator
Instance Method Summary collapse
Instance Method Details
#add_resource_route ⇒ Object
10 11 12 13 14 15 |
# File 'lib/generators/active_scaffold/active_scaffold_generator.rb', line 10 def add_resource_route route_config = class_path.collect{|namespace| "namespace :#{namespace} do " }.join(" ") route_config << "resources :#{file_name.pluralize} do as_routes end" route_config << " end" * class_path.size route route_config end |