aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer
diff options
context:
space:
mode:
authorYehuda Katz <wycats@gmail.com>2009-08-07 03:18:45 -0300
committerYehuda Katz <wycats@gmail.com>2009-08-07 03:18:45 -0300
commit0612fd0f09977dece11a0325a0d7ee07c5cab35c (patch)
treed225dd3b608eca95a388f61bda4225de75654a79 /actionmailer
parentb3e199f6981b2fbf062fe668ff93b7dc56e98a38 (diff)
downloadrails-0612fd0f09977dece11a0325a0d7ee07c5cab35c.tar.gz
rails-0612fd0f09977dece11a0325a0d7ee07c5cab35c.tar.bz2
rails-0612fd0f09977dece11a0325a0d7ee07c5cab35c.zip
Replace _render_template_with_layout with _render_template since the layout is optional
Diffstat (limited to 'actionmailer')
-rw-r--r--actionmailer/lib/action_mailer/base.rb4
-rw-r--r--actionmailer/test/mail_service_test.rb10
2 files changed, 8 insertions, 6 deletions
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb
index b5a0d0ab96..7b03a7f9ff 100644
--- a/actionmailer/lib/action_mailer/base.rb
+++ b/actionmailer/lib/action_mailer/base.rb
@@ -566,7 +566,7 @@ module ActionMailer #:nodoc:
@template = initialize_template_class(body)
layout = _pick_layout(layout, true) unless
ActionController::Base.exempt_from_layout.include?(template.handler)
- @template._render_template_with_layout(template, layout, {})
+ @template._render_template(template, layout, {})
ensure
@current_template_content_type = nil
end
@@ -592,7 +592,7 @@ module ActionMailer #:nodoc:
!template || ActionController::Base.exempt_from_layout.include?(template.handler))
if template
- @template._render_template_with_layout(template, layout, opts)
+ @template._render_template(template, layout, opts)
elsif inline = opts[:inline]
@template._render_inline(inline, layout, opts)
end
diff --git a/actionmailer/test/mail_service_test.rb b/actionmailer/test/mail_service_test.rb
index 30d1b836c4..f2a8c2303c 100644
--- a/actionmailer/test/mail_service_test.rb
+++ b/actionmailer/test/mail_service_test.rb
@@ -573,12 +573,14 @@ class ActionMailerTest < Test::Unit::TestCase
@info_contents, @debug_contents = "", ""
end
- def info(str)
- @info_contents << str
+ def info(str = nil, &blk)
+ @info_contents << str if str
+ @info_contents << blk.call if block_given?
end
- def debug(str)
- @debug_contents << str
+ def debug(str = nil, &blk)
+ @debug_contents << str if str
+ @debug_contents << blk.call if block_given?
end
end