diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2013-08-26 03:07:30 -0700 |
---|---|---|
committer | Piotr Sarnacki <drogus@gmail.com> | 2013-08-26 03:07:30 -0700 |
commit | c19958015fac7b50f8dedbdf17991c00d6b8bbd4 (patch) | |
tree | 42431a33fd65c954b1242b8ff6116163c9969924 /actionmailer/lib | |
parent | 27dc4fa28ee098d70a11829ad5fa4af0c54e880b (diff) | |
parent | 0d43df7ebf7587f032e3b16c153bf35746878c46 (diff) | |
download | rails-c19958015fac7b50f8dedbdf17991c00d6b8bbd4.tar.gz rails-c19958015fac7b50f8dedbdf17991c00d6b8bbd4.tar.bz2 rails-c19958015fac7b50f8dedbdf17991c00d6b8bbd4.zip |
Merge pull request #11396 from strzalek/extract_renderers
Remove dependency on Action View from Action Pack
This set of changes removes the need of using Action View with Action Pack.
Now you may use controllers without Action View, by rendering `:text` response
or alternatively you can plug in your own rendering logic. This is especially
handy when you're just dealing with APIs and don't need to include entire
Action View just to render simple JSON responses.
Diffstat (limited to 'actionmailer/lib')
-rw-r--r-- | actionmailer/lib/action_mailer.rb | 1 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/base.rb | 6 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/log_subscriber.rb | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/actionmailer/lib/action_mailer.rb b/actionmailer/lib/action_mailer.rb index c45124be80..5b6960c8fc 100644 --- a/actionmailer/lib/action_mailer.rb +++ b/actionmailer/lib/action_mailer.rb @@ -22,7 +22,6 @@ #++ require 'abstract_controller' -require 'action_view' require 'action_mailer/version' # Common Active Support usage in Action Mailer diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index cc3a412221..ada86fbc4f 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -3,6 +3,7 @@ require 'action_mailer/collector' require 'active_support/core_ext/string/inflections' require 'active_support/core_ext/hash/except' require 'active_support/core_ext/module/anonymous' + require 'action_mailer/log_subscriber' module ActionMailer @@ -361,11 +362,12 @@ module ActionMailer # <tt>delivery_method :test</tt>. Most useful for unit and functional testing. class Base < AbstractController::Base include DeliveryMethods + abstract! - include AbstractController::Logger include AbstractController::Rendering - include AbstractController::Layouts + + include AbstractController::Logger include AbstractController::Helpers include AbstractController::Translation include AbstractController::AssetPaths diff --git a/actionmailer/lib/action_mailer/log_subscriber.rb b/actionmailer/lib/action_mailer/log_subscriber.rb index c108156792..8467d45986 100644 --- a/actionmailer/lib/action_mailer/log_subscriber.rb +++ b/actionmailer/lib/action_mailer/log_subscriber.rb @@ -1,3 +1,5 @@ +require 'active_support/log_subscriber' + module ActionMailer # Implements the ActiveSupport::LogSubscriber for logging notifications when # email is delivered and received. |