This method is deprecated or moved on the latest stable version.
The last existing version (v3.1.0) is shown here.
attachment(params, &block)
public
Add an attachment to a
multipart message. This is simply a part with the
content-disposition set to “attachment”.
# File actionmailer/lib/action_mailer/old_api.rb, line 93
def attachment(params, &block)
ActiveSupport::Deprecation.warn "attachment() is deprecated and will be removed in future versions. " <<
"Please use the attachments[] API instead."
params = { :content_type => params } if String === params
params[:content] ||= params.delete(:data) || params.delete(:body)
if params[:filename]
params = normalize_file_hash(params)
else
params = normalize_nonfile_hash(params)
end
part(params, &block)
end