aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/lib/action_mailer
diff options
context:
space:
mode:
Diffstat (limited to 'actionmailer/lib/action_mailer')
-rw-r--r--actionmailer/lib/action_mailer/base.rb5
1 files 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?