diff options
author | José Valim <jose.valim@plataformatec.com.br> | 2013-09-09 12:05:09 -0300 |
---|---|---|
committer | José Valim <jose.valim@plataformatec.com.br> | 2013-09-09 12:33:53 -0300 |
commit | a41669563b960d604068013a5b808476391b1cb9 (patch) | |
tree | 7dc3d804f06d05de471e34ef8ff3e63618fe2d3e /actionpack/lib/action_controller | |
parent | ff8fac614f04f9cc7bc4ce78f3b9a758814cd0ab (diff) | |
download | rails-a41669563b960d604068013a5b808476391b1cb9.tar.gz rails-a41669563b960d604068013a5b808476391b1cb9.tar.bz2 rails-a41669563b960d604068013a5b808476391b1cb9.zip |
Remove BasicRendering and remove template functionality from AbsC::Rendering
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/base.rb | 3 | ||||
-rw-r--r-- | actionpack/lib/action_controller/metal/rendering.rb | 8 |
2 files changed, 7 insertions, 4 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index df416908f0..4b2c00c86a 100644 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -3,7 +3,7 @@ require "action_controller/metal/params_wrapper" module ActionController # The <tt>metal</tt> anonymous class was introduced to solve issue with including modules in <tt>ActionController::Base</tt>. - # Modules needes to be included in particluar order. First wee need to have <tt>AbstractController::Rendering</tt> included, + # Modules needes to be included in particluar order. First we need to have <tt>AbstractController::Rendering</tt> included, # next we should include actuall implementation which would be for example <tt>ActionView::Rendering</tt> and after that # <tt>ActionController::Rendering</tt>. This order must be preserved and as we want to have middle module included dynamicaly # <tt>metal</tt> class was introduced. It has <tt>AbstractController::Rendering</tt> included and is parent class of @@ -14,7 +14,6 @@ module ActionController # metal = Class.new(Metal) do include AbstractController::Rendering - include AbstractController::BasicRendering end # Action Controllers are the core of a web request in \Rails. They are made up of one or more actions that are executed diff --git a/actionpack/lib/action_controller/metal/rendering.rb b/actionpack/lib/action_controller/metal/rendering.rb index 7b4f1f73a5..37dee1738f 100644 --- a/actionpack/lib/action_controller/metal/rendering.rb +++ b/actionpack/lib/action_controller/metal/rendering.rb @@ -28,8 +28,12 @@ module ActionController end end - def render_to_body(*) - super || " " + def render_to_body(options = {}) + super || if options[:text].present? + options[:text] + else + " " + end end private |