diff options
-rw-r--r-- | railties/CHANGELOG | 2 | ||||
-rw-r--r-- | railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG index 05884d43cd..d4c2b3cc40 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Generate scaffold layout in subdirectory appropriate to its module nesting. #5511 [nils@alumni.rice.edu] + * Mongrel: script/server tails the rails log like it does with lighttpd. Prefer mongrel over lighttpd. #5541 [mike@clarkware.com] * Don't assume Active Record is available. #5497 [bob@sporkmonger.com] 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' |