diff options
author | Mikel Lindsaar <raasdnil@gmail.com> | 2009-11-24 09:33:05 +1100 |
---|---|---|
committer | Mikel Lindsaar <raasdnil@gmail.com> | 2009-11-24 09:33:05 +1100 |
commit | 2e453d930d5c0ffaaeed69a5c881d5fbb2df1bfa (patch) | |
tree | e2d8628eb85105db102c01923daa9b923f485cdc /actionmailer/lib | |
parent | 906e308220785b0c57c78462b05eb1552387a9b8 (diff) | |
download | rails-2e453d930d5c0ffaaeed69a5c881d5fbb2df1bfa.tar.gz rails-2e453d930d5c0ffaaeed69a5c881d5fbb2df1bfa.tar.bz2 rails-2e453d930d5c0ffaaeed69a5c881d5fbb2df1bfa.zip |
Changed deprecation to use ActiveSupport::Deprecation
Diffstat (limited to 'actionmailer/lib')
-rw-r--r-- | actionmailer/lib/action_mailer/base.rb | 5 |
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? |