提交 61f9e47f 编写于 作者: A Andrew White

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
......@@ -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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册