From 2e453d930d5c0ffaaeed69a5c881d5fbb2df1bfa Mon Sep 17 00:00:00 2001 From: Mikel Lindsaar Date: Tue, 24 Nov 2009 09:33:05 +1100 Subject: Changed deprecation to use ActiveSupport::Deprecation --- 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 af3ef877b2..9876b88ecd 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -372,8 +372,9 @@ module ActionMailer #:nodoc: def part(params) params = {:content_type => params} if String === params if custom_headers = params.delete(:headers) - STDERR.puts("Passing custom headers with :headers => {} is deprecated. Please just pass in custom headers directly.") - params = params.merge(custom_headers) + ActiveSupport::Deprecation.warn('Passing custom headers with :headers => {} is deprecated. ' << + 'Please just pass in custom headers directly.', caller[0,10]) + params.merge!(custom_headers) end part = Mail::Part.new(params) yield part if block_given? -- cgit v1.2.3