Skip to content
This repository
Browse code

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...
commit 9200dad7c928df70980975709a4dbeb126e821c2 1 parent eec4638
David Heinemeier Hansson authored December 01, 2004

Showing 1 changed file with 3 additions and 0 deletions. Show diff stats Hide diff stats

  1. 3  railties/lib/generator.rb
3  railties/lib/generator.rb
@@ -61,6 +61,9 @@ def generate
61 61
       # Function test.
62 62
       generate_file "controller_test.erb", "test/functional/#{file_name}_controller_test.rb"
63 63
 
  64
+      # Create the views directory even if there are no actions.
  65
+      FileUtils.mkdir_p "app/views/#{file_name}"
  66
+
64 67
       # View template for each action.
65 68
       @actions.each do |action|
66 69
         generate_file "controller_view.rhtml",

0 notes on commit 9200dad

Please sign in to comment.
Something went wrong with that request. Please try again.