diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2010-01-31 14:32:26 +0000 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2010-01-31 14:32:26 +0000 |
commit | ed60021f39f7913537dcad181e4061e423dc6c3d (patch) | |
tree | 86532c43aabe9125422f84b48a899f2672900bf5 /actionmailer/lib | |
parent | c6af337d2d6c86792cdc8132224ebe9294d35774 (diff) | |
parent | b3a028259f373fd58fea2171a1e9e8b2fe3e253a (diff) | |
download | rails-ed60021f39f7913537dcad181e4061e423dc6c3d.tar.gz rails-ed60021f39f7913537dcad181e4061e423dc6c3d.tar.bz2 rails-ed60021f39f7913537dcad181e4061e423dc6c3d.zip |
Merge remote branch 'mainstream/master'
Conflicts:
activemodel/lib/active_model/state_machine.rb
Diffstat (limited to 'actionmailer/lib')
-rw-r--r-- | actionmailer/lib/action_mailer.rb | 10 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/base.rb | 7 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/railtie.rb | 4 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/tmail_compat.rb | 8 |
4 files changed, 21 insertions, 8 deletions
diff --git a/actionmailer/lib/action_mailer.rb b/actionmailer/lib/action_mailer.rb index 17f63aca25..0265e6e222 100644 --- a/actionmailer/lib/action_mailer.rb +++ b/actionmailer/lib/action_mailer.rb @@ -24,9 +24,17 @@ actionpack_path = File.expand_path('../../../actionpack/lib', __FILE__) $:.unshift(actionpack_path) if File.directory?(actionpack_path) && !$:.include?(actionpack_path) -require 'action_controller' +require 'abstract_controller' require 'action_view' +# Common ActiveSupport usage in ActionMailer +require 'active_support/core_ext/class' +require 'active_support/core_ext/object/blank' +require 'active_support/core_ext/array/uniq_by' +require 'active_support/core_ext/module/attr_internal' +require 'active_support/core_ext/module/delegation' +require 'active_support/core_ext/string/inflections' + module ActionMailer extend ::ActiveSupport::Autoload diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 087f345c3f..aa9822c6ab 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -1,8 +1,3 @@ -require 'active_support/core_ext/class' -require 'active_support/core_ext/object/blank' -require 'active_support/core_ext/array/uniq_by' -require 'active_support/core_ext/module/delegation' -require 'active_support/core_ext/string/inflections' require 'mail' require 'action_mailer/tmail_compat' require 'action_mailer/collector' @@ -263,8 +258,8 @@ module ActionMailer #:nodoc: include AbstractController::LocalizedCache include AbstractController::Layouts include AbstractController::Helpers - include AbstractController::UrlFor include AbstractController::Translation + include AbstractController::Compatibility helper ActionMailer::MailHelper diff --git a/actionmailer/lib/action_mailer/railtie.rb b/actionmailer/lib/action_mailer/railtie.rb index 7ed1519e36..4ed70503fd 100644 --- a/actionmailer/lib/action_mailer/railtie.rb +++ b/actionmailer/lib/action_mailer/railtie.rb @@ -17,5 +17,9 @@ module ActionMailer ActionMailer::Base.send "#{k}=", v end end + + initializer "action_mailer.url_for" do |app| + ActionMailer::Base.send(:include, ActionController::UrlFor) if defined?(ActionController) + end end end
\ No newline at end of file diff --git a/actionmailer/lib/action_mailer/tmail_compat.rb b/actionmailer/lib/action_mailer/tmail_compat.rb index c6efdc53b6..26962f972f 100644 --- a/actionmailer/lib/action_mailer/tmail_compat.rb +++ b/actionmailer/lib/action_mailer/tmail_compat.rb @@ -17,7 +17,13 @@ module Mail old_transfer_encoding end 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]) + self.content_transfer_encoding = value + end + def original_filename ActiveSupport::Deprecation.warn('Message#original_filename is deprecated, ' << 'please call Message#filename', caller[0,2]) |