diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2004-12-01 12:07:07 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2004-12-01 12:07:07 +0000 |
commit | 9200dad7c928df70980975709a4dbeb126e821c2 (patch) | |
tree | edb522bada65064970a1460b252676b4d230c5e5 /railties/lib | |
parent | eec4638eb645625fa9c525929d95f82bd4c87601 (diff) | |
download | rails-9200dad7c928df70980975709a4dbeb126e821c2.tar.gz rails-9200dad7c928df70980975709a4dbeb126e821c2.tar.bz2 rails-9200dad7c928df70980975709a4dbeb126e821c2.zip |
script/new_controller should create directory for views even when no actions are specified [bitsweat]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@36 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/generator.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/railties/lib/generator.rb b/railties/lib/generator.rb index 28b41c60f0..2f63341965 100644 --- a/railties/lib/generator.rb +++ b/railties/lib/generator.rb @@ -61,6 +61,9 @@ module Generator # Function test. generate_file "controller_test.erb", "test/functional/#{file_name}_controller_test.rb" + # Create the views directory even if there are no actions. + FileUtils.mkdir_p "app/views/#{file_name}" + # View template for each action. @actions.each do |action| generate_file "controller_view.rhtml", |