aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/lib/action_mailer/tmail_compat.rb
blob: d78332c1354b06447667ef0ac42630ed42d2aa6d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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,10])
      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,10])
        content_transfer_encoding(value)
      else
        old_transfer_encoding
      end
    end
    
    def original_filename
      ActiveSupport::Deprecation.warn('Message#original_filename is deprecated, ' <<
                                      'please call Message#filename', caller[0,10])
      filename
    end
    
  end
end