diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-09-17 06:36:04 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-09-17 06:36:04 +0000 |
commit | dfd0bdf1a0970c988419d12f2c22da2fc26dece7 (patch) | |
tree | 6934d5adc13488f31a287963048588ba146ce940 /railties/lib | |
parent | 9acb1f95c9853dba704be7c690c4c0746ca8e8d6 (diff) | |
download | rails-dfd0bdf1a0970c988419d12f2c22da2fc26dece7.tar.gz rails-dfd0bdf1a0970c988419d12f2c22da2fc26dece7.tar.bz2 rails-dfd0bdf1a0970c988419d12f2c22da2fc26dece7.zip |
Fixed that generate scaffold claims all words are reserved #2200, #2211 [alancfrancis@gmail.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2253 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb b/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb index 7c46869f5e..5ffe428fce 100644 --- a/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb +++ b/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb @@ -67,6 +67,9 @@ class ScaffoldGenerator < Rails::Generator::NamedBase m.directory File.join('app/views', controller_class_path, controller_file_name) m.directory File.join('test/functional', controller_class_path) + # Depend on model generator but skip if the model exists. + m.dependency 'model', [singular_name], :collision => :skip + # Scaffolded forms. m.complex_template "form.rhtml", File.join('app/views', @@ -79,8 +82,6 @@ class ScaffoldGenerator < Rails::Generator::NamedBase :end_mark => 'eoform', :mark_id => singular_name - # Depend on model generator but skip if the model exists. - m.dependency 'model', [singular_name], :collision => :skip # Scaffolded views. scaffold_views.each do |action| |