aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer
diff options
context:
space:
mode:
Diffstat (limited to 'actionmailer')
-rw-r--r--actionmailer/lib/action_mailer/base.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb
index 24be66d197..df3bfb3620 100644
--- a/actionmailer/lib/action_mailer/base.rb
+++ b/actionmailer/lib/action_mailer/base.rb
@@ -394,7 +394,7 @@ module ActionMailer #:nodoc:
def controller_path
self.class.controller_path
end
-
+
def formats
@template.formats
end
@@ -583,9 +583,9 @@ module ActionMailer #:nodoc:
if template.respond_to?(:mime_type)
@current_template_content_type = template.mime_type && template.mime_type.to_sym.to_s
end
-
+
@template = initialize_template_class(body)
- layout = _pick_layout(layout, true) unless
+ layout = _pick_layout(layout, true) unless
ActionController::Base.exempt_from_layout.include?(template.handler)
@template._render_template(template, layout, {})
ensure
@@ -601,16 +601,16 @@ module ActionMailer #:nodoc:
def render(opts)
opts[:locals] ||= {}
layout, file = opts.delete(:layout), opts[:file]
-
+
begin
@template = initialize_template_class(opts.delete(:body))
-
+
if file
prefix = mailer_name unless file =~ /\//
template = view_paths.find(file, {:formats => formats}, prefix)
end
- layout = _pick_layout(layout,
+ layout = _pick_layout(layout,
!template || ActionController::Base.exempt_from_layout.include?(template.handler))
if template
@@ -649,7 +649,7 @@ module ActionMailer #:nodoc:
def sort_parts(parts, order = [])
order = order.collect { |s| s.downcase }
-
+
parts = parts.sort do |a, b|
a_ct = a.content_type.downcase
b_ct = b.content_type.downcase
@@ -690,7 +690,7 @@ module ActionMailer #:nodoc:
headers.each { |k, v| m[k] = v }
real_content_type, ctype_attrs = parse_content_type
-
+
if @parts.empty?
m.set_content_type(real_content_type, nil, ctype_attrs)
m.body = normalize_new_lines(body)