diff options
author | Kassio Borges <kassioborgesm@gmail.com> | 2013-12-19 22:12:55 -0200 |
---|---|---|
committer | Kassio Borges <kassioborgesm@gmail.com> | 2013-12-20 18:34:57 -0200 |
commit | 02c814c99202e42ebeb10b89af1392b594c727e9 (patch) | |
tree | f2c479e4e65c8ba26c66616af123c357edee4766 /railties/lib/rails/generators/erb/controller | |
parent | d0ffa7f8535dc343bb8a421520ea32d8e8be916f (diff) | |
download | rails-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.rb | 6 |
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 |