diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2006-11-01 01:57:06 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2006-11-01 01:57:06 +0000 |
commit | c5dcec789e5513ef1cfd8ef468cd2a46cdaf01f5 (patch) | |
tree | f3a166ae1d6f2c69619871b4c326f70cf706a0d7 /railties/lib/rails_generator/generators/components/resource/resource_generator.rb | |
parent | 98a9b6521886009187afd324e0cdad64902e0e97 (diff) | |
download | rails-c5dcec789e5513ef1cfd8ef468cd2a46cdaf01f5.tar.gz rails-c5dcec789e5513ef1cfd8ef468cd2a46cdaf01f5.tar.bz2 rails-c5dcec789e5513ef1cfd8ef468cd2a46cdaf01f5.zip |
resource and scaffold_resource generators add a restful route to config/routes.rb
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5379 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib/rails_generator/generators/components/resource/resource_generator.rb')
-rw-r--r-- | railties/lib/rails_generator/generators/components/resource/resource_generator.rb | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/railties/lib/rails_generator/generators/components/resource/resource_generator.rb b/railties/lib/rails_generator/generators/components/resource/resource_generator.rb index 34abc6c97b..fd834bb149 100644 --- a/railties/lib/rails_generator/generators/components/resource/resource_generator.rb +++ b/railties/lib/rails_generator/generators/components/resource/resource_generator.rb @@ -26,7 +26,7 @@ class ResourceGenerator < Rails::Generator::NamedBase end def manifest - recorded_session = record do |m| + record do |m| # Check for class naming collisions. m.class_collisions(controller_class_path, "#{controller_class_name}Controller", "#{controller_class_name}Helper") m.class_collisions(class_path, "#{class_name}") @@ -60,18 +60,9 @@ class ResourceGenerator < Rails::Generator::NamedBase :migration_file_name => "create_#{file_path.gsub(/\//, '_').pluralize}" ) end - end - - puts - puts ("-" * 70) - puts "Don't forget the restful route in config/routes.rb" - puts - puts " map.resources :#{controller_file_name}" - puts - puts ("-" * 70) - puts - recorded_session + m.route_resources controller_file_name + end end protected |