diff options
author | Matthew Brindley <matt@mattbrindley.com> | 2008-05-12 13:20:54 +1200 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-05-13 10:50:00 +0100 |
commit | 9fb01ce4b194567e84fa2f8582410fc76720a31f (patch) | |
tree | e1bdca1c69d665a46d00b4a0d892fe8d4163f559 | |
parent | 2270371f5dbabdd25ffcc59389249a795ba324a1 (diff) | |
download | rails-9fb01ce4b194567e84fa2f8582410fc76720a31f.tar.gz rails-9fb01ce4b194567e84fa2f8582410fc76720a31f.tar.bz2 rails-9fb01ce4b194567e84fa2f8582410fc76720a31f.zip |
ScaffoldGenerator to create public/stylesheets if missing. [#165 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
-rw-r--r-- | railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb | 3 |
1 files changed, 2 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 864a0bc528..e2902bf4b9 100644 --- a/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb +++ b/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb @@ -34,7 +34,7 @@ class ScaffoldGenerator < Rails::Generator::NamedBase m.class_collisions(controller_class_path, "#{controller_class_name}Controller", "#{controller_class_name}Helper") m.class_collisions(class_path, "#{class_name}") - # Controller, helper, views, and test directories. + # Controller, helper, views, test and stylesheets directories. m.directory(File.join('app/models', class_path)) m.directory(File.join('app/controllers', controller_class_path)) m.directory(File.join('app/helpers', controller_class_path)) @@ -42,6 +42,7 @@ class ScaffoldGenerator < Rails::Generator::NamedBase m.directory(File.join('app/views/layouts', controller_class_path)) m.directory(File.join('test/functional', controller_class_path)) m.directory(File.join('test/unit', class_path)) + m.directory(File.join('public/stylesheets', class_path)) for action in scaffold_views m.template( |