diff options
Diffstat (limited to 'railties')
-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", |