mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Changed deprecation to use ActiveSupport::Deprecation
This commit is contained in:
@@ -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?
|
||||
|
||||
Reference in New Issue
Block a user