diff options
Diffstat (limited to 'railties/lib/rails')
3 files changed, 3 insertions, 3 deletions
diff --git a/railties/lib/rails/generators/erb.rb b/railties/lib/rails/generators/erb.rb index 33f8a9da6f..0755ac335c 100644 --- a/railties/lib/rails/generators/erb.rb +++ b/railties/lib/rails/generators/erb.rb @@ -6,7 +6,7 @@ module Erb # :nodoc: protected def formats - format + [format] end def format diff --git a/railties/lib/rails/generators/erb/controller/controller_generator.rb b/railties/lib/rails/generators/erb/controller/controller_generator.rb index e62aece7c5..94c1b835d1 100644 --- a/railties/lib/rails/generators/erb/controller/controller_generator.rb +++ b/railties/lib/rails/generators/erb/controller/controller_generator.rb @@ -11,7 +11,7 @@ module Erb # :nodoc: actions.each do |action| @action = action - Array(formats).each do |format| + formats.each do |format| @path = File.join(base_path, filename_with_extensions(action, format)) template filename_with_extensions(:view, format), @path end diff --git a/railties/lib/rails/generators/erb/scaffold/scaffold_generator.rb b/railties/lib/rails/generators/erb/scaffold/scaffold_generator.rb index b219f459ac..c94829a0ae 100644 --- a/railties/lib/rails/generators/erb/scaffold/scaffold_generator.rb +++ b/railties/lib/rails/generators/erb/scaffold/scaffold_generator.rb @@ -14,7 +14,7 @@ module Erb # :nodoc: def copy_view_files available_views.each do |view| - Array(formats).each do |format| + formats.each do |format| filename = filename_with_extensions(view, format) template filename, File.join("app/views", controller_file_path, filename) end |