1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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
This commit is contained in:
Jeremy Kemper 2008-01-05 00:26:27 +00:00
parent 752f633bc5
commit 5ccc3cf448

View file

@ -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('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.template('style.css', 'public/stylesheets/scaffold.css')
m.dependency 'model', [name] + @args, :collision => :skip
m.template( m.template(
'controller.rb', File.join('app/controllers', controller_class_path, "#{controller_file_name}_controller.rb") '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.template('helper.rb', File.join('app/helpers', controller_class_path, "#{controller_file_name}_helper.rb"))
m.route_resources controller_file_name m.route_resources controller_file_name
m.dependency 'model', [name] + @args, :collision => :skip
end end
end end