diff options
author | Isaac Betesh <iybetesh@gmail.com> | 2015-09-09 08:44:12 -0400 |
---|---|---|
committer | Isaac Betesh <iybetesh@gmail.com> | 2015-09-09 08:44:37 -0400 |
commit | efadc69daae8954f6e81162e5118af89dbd0ecf4 (patch) | |
tree | b4e69ee07d0ff066368b5be7d2ee4a8fb0380a48 | |
parent | d73d1a26b342b2323a58b55021eb8701790ada2a (diff) | |
download | rails-efadc69daae8954f6e81162e5118af89dbd0ecf4.tar.gz rails-efadc69daae8954f6e81162e5118af89dbd0ecf4.tar.bz2 rails-efadc69daae8954f6e81162e5118af89dbd0ecf4.zip |
When used by ActionMailer, ActionView should automatically use the correct MIME type just as it does when used by ActionDispatch #11157
-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 |