aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/generators/erb/controller
diff options
context:
space:
mode:
authorKassio Borges <kassioborgesm@gmail.com>2013-12-19 22:12:55 -0200
committerKassio Borges <kassioborgesm@gmail.com>2013-12-20 18:34:57 -0200
commit02c814c99202e42ebeb10b89af1392b594c727e9 (patch)
treef2c479e4e65c8ba26c66616af123c357edee4766 /railties/lib/rails/generators/erb/controller
parentd0ffa7f8535dc343bb8a421520ea32d8e8be916f (diff)
downloadrails-02c814c99202e42ebeb10b89af1392b594c727e9.tar.gz
rails-02c814c99202e42ebeb10b89af1392b594c727e9.tar.bz2
rails-02c814c99202e42ebeb10b89af1392b594c727e9.zip
`html` and `text` templates for mailers by default
Diffstat (limited to 'railties/lib/rails/generators/erb/controller')
-rw-r--r--railties/lib/rails/generators/erb/controller/controller_generator.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/railties/lib/rails/generators/erb/controller/controller_generator.rb b/railties/lib/rails/generators/erb/controller/controller_generator.rb
index 5f06734ab8..e62aece7c5 100644
--- a/railties/lib/rails/generators/erb/controller/controller_generator.rb
+++ b/railties/lib/rails/generators/erb/controller/controller_generator.rb
@@ -11,8 +11,10 @@ module Erb # :nodoc:
actions.each do |action|
@action = action
- @path = File.join(base_path, filename_with_extensions(action))
- template filename_with_extensions(:view), @path
+ Array(formats).each do |format|
+ @path = File.join(base_path, filename_with_extensions(action, format))
+ template filename_with_extensions(:view, format), @path
+ end
end
end
end