From efadc69daae8954f6e81162e5118af89dbd0ecf4 Mon Sep 17 00:00:00 2001 From: Isaac Betesh Date: Wed, 9 Sep 2015 08:44:12 -0400 Subject: When used by ActionMailer, ActionView should automatically use the correct MIME type just as it does when used by ActionDispatch #11157 --- actionmailer/lib/action_mailer.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'actionmailer/lib') 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 -- cgit v1.2.3