diff options
author | José Valim and Mikel Lindsaar <raasdnil@gmail.com> | 2010-01-22 12:51:07 +1100 |
---|---|---|
committer | José Valim and Mikel Lindsaar <raasdnil@gmail.com> | 2010-01-22 12:51:07 +1100 |
commit | 90bbed233e14957376d6c1985202c495b3af6ed4 (patch) | |
tree | f85c6b49f737192ba3fb7364936c26f60e6d4489 /actionmailer/lib | |
parent | 77986f6bdb18414d730fa1ec686365dff26bb4fe (diff) | |
download | rails-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')
-rw-r--r-- | actionmailer/lib/action_mailer/deprecated_body.rb | 11 |
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 |