mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Updating deprecated_body.rb to use :content instead of :data or :body in the params hash
This commit is contained in:
@@ -14,10 +14,15 @@ module ActionMailer
|
||||
end
|
||||
|
||||
def attachment(params, &block)
|
||||
if params[:data]
|
||||
ActiveSupport::Deprecation.warn('attachment :data => "string" is deprecated. To set the body of an attachment ' <<
|
||||
'please use :content instead, like attachment :content => "string"', caller[0,10])
|
||||
params[:content] = params.delete(:data)
|
||||
end
|
||||
if params[:body]
|
||||
ActiveSupport::Deprecation.warn('attachment :body => "string" is deprecated. To set the body of an attachment ' <<
|
||||
'please use :data instead, like attachment :data => "string"', caller[0,10])
|
||||
params[:data] = params.delete(:body)
|
||||
ActiveSupport::Deprecation.warn('attachment :data => "string" is deprecated. To set the body of an attachment ' <<
|
||||
'please use :content instead, like attachment :content => "string"', caller[0,10])
|
||||
params[:content] = params.delete(:body)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user