diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2006-07-01 00:11:35 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2006-07-01 00:11:35 +0000 |
commit | 64b7c5fbd19323e02e0e3f58f6d4310d13b9a114 (patch) | |
tree | 4ea2b06ec9cf081d63e87206390152caccc8c233 /railties/lib/rails_generator | |
parent | faba7e93723da428076b0676afd8340b47670da4 (diff) | |
download | rails-64b7c5fbd19323e02e0e3f58f6d4310d13b9a114.tar.gz rails-64b7c5fbd19323e02e0e3f58f6d4310d13b9a114.tar.bz2 rails-64b7c5fbd19323e02e0e3f58f6d4310d13b9a114.zip |
Generate scaffold layout in subdirectory appropriate to its module nesting. Closes #5511.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4527 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib/rails_generator')
-rw-r--r-- | railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb | 6 |
1 files changed, 5 insertions, 1 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 d8e9538299..2a978bc1fa 100644 --- a/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb +++ b/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb @@ -115,7 +115,11 @@ class ScaffoldGenerator < Rails::Generator::NamedBase "#{controller_file_name}_helper.rb") # Layout and stylesheet. - m.template 'layout.rhtml', "app/views/layouts/#{controller_file_name}.rhtml" + m.template 'layout.rhtml', + File.join('app/views/layouts', + controller_class_path, + "#{controller_file_name}.rhtml") + m.template 'style.css', 'public/stylesheets/scaffold.css' |