From 81e814adfad6d4bba1af5f70a5a409f6d71f8f6c Mon Sep 17 00:00:00 2001 From: Carl Lerche Date: Fri, 20 Mar 2009 16:13:13 -0700 Subject: Working on being able to render :text with layouts --- actionpack/lib/action_controller/new_base/renderer.rb | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'actionpack/lib/action_controller/new_base/renderer.rb') diff --git a/actionpack/lib/action_controller/new_base/renderer.rb b/actionpack/lib/action_controller/new_base/renderer.rb index 1308537160..6abf3cef11 100644 --- a/actionpack/lib/action_controller/new_base/renderer.rb +++ b/actionpack/lib/action_controller/new_base/renderer.rb @@ -35,15 +35,16 @@ module ActionController end if options.key?(:text) - _render_text(options) + options[:_template] = ActionView::TextTemplate.new(_text(options)) + template = nil elsif options.key?(:template) - template = options.delete(:template) - super(template) + template = options.delete(:template) elsif options.key?(:action) template = options.delete(:action).to_s options[:_prefix] = _prefix - super(template, options) end + + super(template, options) end private @@ -52,12 +53,12 @@ module ActionController controller_path end - def _render_text(options) + def _text(options) text = options.delete(:text) case text when nil then " " - else text.to_s + else text.to_s end end -- cgit v1.2.3