aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/lib/action_mailer
diff options
context:
space:
mode:
authorJosé Valim and Mikel Lindsaar <raasdnil@gmail.com>2010-01-22 12:51:07 +1100
committerJosé Valim and Mikel Lindsaar <raasdnil@gmail.com>2010-01-22 12:51:07 +1100
commit90bbed233e14957376d6c1985202c495b3af6ed4 (patch)
treef85c6b49f737192ba3fb7364936c26f60e6d4489 /actionmailer/lib/action_mailer
parent77986f6bdb18414d730fa1ec686365dff26bb4fe (diff)
downloadrails-90bbed233e14957376d6c1985202c495b3af6ed4.tar.gz
rails-90bbed233e14957376d6c1985202c495b3af6ed4.tar.bz2
rails-90bbed233e14957376d6c1985202c495b3af6ed4.zip
Updating deprecated_body.rb to use :content instead of :data or :body in the params hash
Diffstat (limited to 'actionmailer/lib/action_mailer')
-rw-r--r--actionmailer/lib/action_mailer/deprecated_body.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/actionmailer/lib/action_mailer/deprecated_body.rb b/actionmailer/lib/action_mailer/deprecated_body.rb
index c82610014f..daaf145327 100644
--- a/actionmailer/lib/action_mailer/deprecated_body.rb
+++ b/actionmailer/lib/action_mailer/deprecated_body.rb
@@ -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