diff options
author | Gonçalo Silva <goncalossilva@gmail.com> | 2011-03-24 17:21:17 +0000 |
---|---|---|
committer | Gonçalo Silva <goncalossilva@gmail.com> | 2011-03-24 17:21:17 +0000 |
commit | 9887f238871bb2dd73de6ce8855615bcc5d8d079 (patch) | |
tree | 74fa9ff9524a51701cfa23f708b3f777c65b7fe5 /actionmailer/lib/action_mailer/tmail_compat.rb | |
parent | aff821508a16245ebc03510ba29c70379718dfb7 (diff) | |
parent | 5214e73850916de3c9127d35a4ecee0424d364a3 (diff) | |
download | rails-9887f238871bb2dd73de6ce8855615bcc5d8d079.tar.gz rails-9887f238871bb2dd73de6ce8855615bcc5d8d079.tar.bz2 rails-9887f238871bb2dd73de6ce8855615bcc5d8d079.zip |
Merge branch 'master' of https://github.com/rails/rails
Diffstat (limited to 'actionmailer/lib/action_mailer/tmail_compat.rb')
-rw-r--r-- | actionmailer/lib/action_mailer/tmail_compat.rb | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/actionmailer/lib/action_mailer/tmail_compat.rb b/actionmailer/lib/action_mailer/tmail_compat.rb index 26962f972f..1b2cdcfb27 100644 --- a/actionmailer/lib/action_mailer/tmail_compat.rb +++ b/actionmailer/lib/action_mailer/tmail_compat.rb @@ -1,17 +1,19 @@ module Mail class Message - + def set_content_type(*args) - ActiveSupport::Deprecation.warn('Message#set_content_type is deprecated, please just call ' << - 'Message#content_type with the same arguments', caller[0,2]) + message = 'Message#set_content_type is deprecated, please just call ' << + 'Message#content_type with the same arguments' + ActiveSupport::Deprecation.warn(message, caller[0,2]) content_type(*args) end - + alias :old_transfer_encoding :transfer_encoding def transfer_encoding(value = nil) if value - ActiveSupport::Deprecation.warn('Message#transfer_encoding is deprecated, please call ' << - 'Message#content_transfer_encoding with the same arguments', caller[0,2]) + message = 'Message#transfer_encoding is deprecated, ' << + 'please call Message#content_transfer_encoding with the same arguments' + ActiveSupport::Deprecation.warn(message, caller[0,2]) content_transfer_encoding(value) else old_transfer_encoding @@ -19,16 +21,17 @@ module Mail end def transfer_encoding=(value) - ActiveSupport::Deprecation.warn('Message#transfer_encoding= is deprecated, please call ' << - 'Message#content_transfer_encoding= with the same arguments', caller[0,2]) + message = 'Message#transfer_encoding= is deprecated, ' << + 'please call Message#content_transfer_encoding= with the same arguments' + ActiveSupport::Deprecation.warn(message, caller[0,2]) self.content_transfer_encoding = value end def original_filename - ActiveSupport::Deprecation.warn('Message#original_filename is deprecated, ' << - 'please call Message#filename', caller[0,2]) + message = 'Message#original_filename is deprecated, please call Message#filename' + ActiveSupport::Deprecation.warn(message, caller[0,2]) filename end - + end -end
\ No newline at end of file +end |