Permalink
Browse files

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
  • Loading branch information...
dhh committed Dec 1, 2004
1 parent eec4638 commit 9200dad7c928df70980975709a4dbeb126e821c2
Showing with 3 additions and 0 deletions.
  1. +3 −0 railties/lib/generator.rb
@@ -61,6 +61,9 @@ def generate
# 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",

0 comments on commit 9200dad

Please sign in to comment.