diff options
Diffstat (limited to 'railties/lib/generators/erb/controller/controller_generator.rb')
-rw-r--r-- | railties/lib/generators/erb/controller/controller_generator.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/railties/lib/generators/erb/controller/controller_generator.rb b/railties/lib/generators/erb/controller/controller_generator.rb index ab7b273662..a8bbcf401c 100644 --- a/railties/lib/generators/erb/controller/controller_generator.rb +++ b/railties/lib/generators/erb/controller/controller_generator.rb @@ -5,15 +5,13 @@ module Erb class ControllerGenerator < Base argument :actions, :type => :array, :default => [], :banner => "action action" - def create_view_files + def copy_view_files base_path = File.join("app/views", class_path, file_name) empty_directory base_path actions.each do |action| - @action = action - @path = File.join(base_path, "#{action}.html.erb") - - template 'view.html.erb', @path + @action, @path = action, File.join(base_path, action) + template filename_with_extensions(:view), filename_with_extensions(@path) end end end |