From c1763975e538e23a0b1371bed90a34e51a9c7dba Mon Sep 17 00:00:00 2001 From: Sachin87 Date: Sun, 22 Jan 2012 03:09:17 +0530 Subject: [PATCH] some modifications in action_mailer/base.rb --- actionmailer/lib/action_mailer/base.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 7d8852f961..f5d1121fa5 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -409,7 +409,7 @@ def receive(raw_mail) # and passing a Mail::Message will do nothing except tell the logger you sent the email. def deliver_mail(mail) #:nodoc: ActiveSupport::Notifications.instrument("deliver.action_mailer") do |payload| - self.set_payload_for_mail(payload, mail) + set_payload_for_mail(payload, mail) yield # Let Mail do the delivery actions end end @@ -612,7 +612,8 @@ def mail(headers={}, &block) parts_order = headers[:parts_order] # Call all the procs (if any) - default_values = self.class.default.merge(self.class.default) do |k,v| + class_default = self.class.default + default_values = class_default.merge(class_default) do |k,v| v.respond_to?(:call) ? v.bind(self).call : v end -- GitLab