From ceaa100e59c7953ce5c0e978ddd6d5bc046c9fd9 Mon Sep 17 00:00:00 2001 From: Mikel Lindsaar Date: Sun, 2 May 2010 13:16:28 +1000 Subject: Adding ability for the procs to be called within the instance, allows you to pass results from instance methods to the mail header MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: José Valim --- actionmailer/lib/action_mailer/base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionmailer/lib/action_mailer/base.rb') diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 3a49da5984..b88172dfc2 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -530,7 +530,7 @@ module ActionMailer #:nodoc: # Call all the procs (if any) default_values = self.class.default.merge(self.class.default) do |k,v| - v.respond_to?(:call) ? v.call : v + v.respond_to?(:call) ? v.bind(self).call : v end # Handle defaults -- cgit v1.2.3