aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2008-01-05 00:26:27 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2008-01-05 00:26:27 +0000
commit5ccc3cf448c5ba41761d1f50a476f6793331511d (patch)
tree332f3e29d20b1efd5564a81f2b4eaa22e8a4d80e /railties
parent752f633bc55c191b0b8b555e1444d254334c4157 (diff)
downloadrails-5ccc3cf448c5ba41761d1f50a476f6793331511d.tar.gz
rails-5ccc3cf448c5ba41761d1f50a476f6793331511d.tar.bz2
rails-5ccc3cf448c5ba41761d1f50a476f6793331511d.zip
Move model dependency to the end of the scaffold generator manifest. Closes #10696 [drnic]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8558 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties')
-rw-r--r--railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb4
1 files changed, 2 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 c9ce49a6fc..864a0bc528 100644
--- a/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb
+++ b/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb
@@ -54,8 +54,6 @@ class ScaffoldGenerator < Rails::Generator::NamedBase
m.template('layout.html.erb', File.join('app/views/layouts', controller_class_path, "#{controller_file_name}.html.erb"))
m.template('style.css', 'public/stylesheets/scaffold.css')
- m.dependency 'model', [name] + @args, :collision => :skip
-
m.template(
'controller.rb', File.join('app/controllers', controller_class_path, "#{controller_file_name}_controller.rb")
)
@@ -64,6 +62,8 @@ class ScaffoldGenerator < Rails::Generator::NamedBase
m.template('helper.rb', File.join('app/helpers', controller_class_path, "#{controller_file_name}_helper.rb"))
m.route_resources controller_file_name
+
+ m.dependency 'model', [name] + @args, :collision => :skip
end
end