aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikel Lindsaar <raasdnil@gmail.com>2009-11-24 09:33:05 +1100
committerMikel Lindsaar <raasdnil@gmail.com>2009-11-24 09:33:05 +1100
commit2e453d930d5c0ffaaeed69a5c881d5fbb2df1bfa (patch)
treee2d8628eb85105db102c01923daa9b923f485cdc
parent906e308220785b0c57c78462b05eb1552387a9b8 (diff)
downloadrails-2e453d930d5c0ffaaeed69a5c881d5fbb2df1bfa.tar.gz
rails-2e453d930d5c0ffaaeed69a5c881d5fbb2df1bfa.tar.bz2
rails-2e453d930d5c0ffaaeed69a5c881d5fbb2df1bfa.zip
Changed deprecation to use ActiveSupport::Deprecation
-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?