diff options
author | Andrew White <pixeltrix@users.noreply.github.com> | 2015-09-17 16:59:21 +0100 |
---|---|---|
committer | Andrew White <pixeltrix@users.noreply.github.com> | 2015-09-17 16:59:21 +0100 |
commit | 61f9e47feac75a2cf4ed9e092bac036294564168 (patch) | |
tree | 8c1aa6cc158a5943803c487961175e18dfea865f /actionmailer/lib | |
parent | ff2a4ca756699b56169f1b595c3d340cb54e9de0 (diff) | |
parent | efadc69daae8954f6e81162e5118af89dbd0ecf4 (diff) | |
download | rails-61f9e47feac75a2cf4ed9e092bac036294564168.tar.gz rails-61f9e47feac75a2cf4ed9e092bac036294564168.tar.bz2 rails-61f9e47feac75a2cf4ed9e092bac036294564168.zip |
Merge pull request #21562 from betesh/mime_types_in_actionmailer
When used by ActionMailer, ActionView should automatically use the correct MIME type just as it does when used by ActionDispatch
Diffstat (limited to 'actionmailer/lib')
-rw-r--r-- | actionmailer/lib/action_mailer.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/actionmailer/lib/action_mailer.rb b/actionmailer/lib/action_mailer.rb index 291a8c1e34..312dd1997c 100644 --- a/actionmailer/lib/action_mailer.rb +++ b/actionmailer/lib/action_mailer.rb @@ -49,3 +49,10 @@ module ActionMailer autoload :MessageDelivery autoload :DeliveryJob end + +autoload :Mime, 'action_dispatch/http/mime_type' + +ActiveSupport.on_load(:action_view) do + ActionView::Base.default_formats ||= Mime::SET.symbols + ActionView::Template::Types.delegate_to Mime +end |