提交 04248c62 编写于 作者: J Joshua Peek

Ensure templates are rendered if all the parts are already processed

上级 2561be00
......@@ -470,8 +470,9 @@ def create!(method_name, *parameters) #:nodoc:
# also render a "normal" template (without the content type). If a
# normal template exists (or if there were no implicit parts) we render
# it.
template = template_root["#{mailer_name}/#{@template}"]
@body = render_message(@template, @body) if template
template_exists = @parts.empty?
template_exists ||= template_root["#{mailer_name}/#{@template}"]
@body = render_message(@template, @body) if template_exists
# Finally, if there are other message parts and a textual body exists,
# we shift it onto the front of the parts and set the body to nil (so
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册