aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/lib/action_mailer/tmail_compat.rb
diff options
context:
space:
mode:
authorMikel Lindsaar <mikel@rubyx.com>2011-01-18 11:54:30 +1100
committerMikel Lindsaar <mikel@rubyx.com>2011-01-18 12:06:21 +1100
commitb141fa6280868059dfc7fb6934d2a6b39b7d13b8 (patch)
treeb806ce17fbf844ff76277f142fda37c223f9d787 /actionmailer/lib/action_mailer/tmail_compat.rb
parent3b584aee950f5a602a4acfbc15f9bc1530716dc0 (diff)
downloadrails-b141fa6280868059dfc7fb6934d2a6b39b7d13b8.tar.gz
rails-b141fa6280868059dfc7fb6934d2a6b39b7d13b8.tar.bz2
rails-b141fa6280868059dfc7fb6934d2a6b39b7d13b8.zip
Cleaning up style, concat inside method calls is ugly
Diffstat (limited to 'actionmailer/lib/action_mailer/tmail_compat.rb')
-rw-r--r--actionmailer/lib/action_mailer/tmail_compat.rb21
1 files changed, 12 insertions, 9 deletions
diff --git a/actionmailer/lib/action_mailer/tmail_compat.rb b/actionmailer/lib/action_mailer/tmail_compat.rb
index 26cc474e91..1b2cdcfb27 100644
--- a/actionmailer/lib/action_mailer/tmail_compat.rb
+++ b/actionmailer/lib/action_mailer/tmail_compat.rb
@@ -2,16 +2,18 @@ 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