From dfd0bdf1a0970c988419d12f2c22da2fc26dece7 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 17 Sep 2005 06:36:04 +0000 Subject: 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 --- .../generators/components/scaffold/scaffold_generator.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'railties/lib/rails_generator/generators/components') 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| -- cgit v1.2.3