diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-01-15 15:34:50 -0200 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-01-17 10:04:38 -0200 |
commit | 6244d16eaf8eea9ce963f08dced60399b121a6dc (patch) | |
tree | d2f7073248cacf3d7a91c2829ee4cb743592ef27 /actionpack | |
parent | 562a12df29b573406b15e9824a8288ad8ee6da83 (diff) | |
download | rails-6244d16eaf8eea9ce963f08dced60399b121a6dc.tar.gz rails-6244d16eaf8eea9ce963f08dced60399b121a6dc.tar.bz2 rails-6244d16eaf8eea9ce963f08dced60399b121a6dc.zip |
Move render :nothing and :text => nil options to AC::Rendering
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/abstract_controller/rendering.rb | 3 | ||||
-rw-r--r-- | actionpack/lib/action_controller/metal/compatibility.rb | 10 |
2 files changed, 3 insertions, 10 deletions
diff --git a/actionpack/lib/abstract_controller/rendering.rb b/actionpack/lib/abstract_controller/rendering.rb index ddc93464cd..bca0dcffd8 100644 --- a/actionpack/lib/abstract_controller/rendering.rb +++ b/actionpack/lib/abstract_controller/rendering.rb @@ -165,6 +165,9 @@ module AbstractController options[:prefixes] ||= _prefixes end + options[:text] = nil if options.delete(:nothing) == true + options[:text] = " " if options.key?(:text) && options[:text].nil? + options[:template] ||= (options[:action] || action_name).to_s options end diff --git a/actionpack/lib/action_controller/metal/compatibility.rb b/actionpack/lib/action_controller/metal/compatibility.rb index a9e46f9343..835d1f7e35 100644 --- a/actionpack/lib/action_controller/metal/compatibility.rb +++ b/actionpack/lib/action_controller/metal/compatibility.rb @@ -14,12 +14,6 @@ module ActionController ] end - def _normalize_options(options) - options[:text] = nil if options.delete(:nothing) == true - options[:text] = " " if options.key?(:text) && options[:text].nil? - super - end - def render_to_body(options) super || " " end @@ -31,9 +25,5 @@ module ActionController def method_for_action(action_name) super || (respond_to?(:method_missing) && "_handle_method_missing") end - - def performed? - response_body - end end end |