aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/new_base/renderer.rb
diff options
context:
space:
mode:
authorCarl Lerche <carllerche@mac.com>2009-03-20 16:13:13 -0700
committerYehuda Katz <wycats@gmail.com>2009-03-23 10:23:14 -0700
commit81e814adfad6d4bba1af5f70a5a409f6d71f8f6c (patch)
treea1dfa746191d7509f6f695b2e99d5a7f79278b91 /actionpack/lib/action_controller/new_base/renderer.rb
parent90c079a7814a9a996c8cbe353015c080fafce2bc (diff)
downloadrails-81e814adfad6d4bba1af5f70a5a409f6d71f8f6c.tar.gz
rails-81e814adfad6d4bba1af5f70a5a409f6d71f8f6c.tar.bz2
rails-81e814adfad6d4bba1af5f70a5a409f6d71f8f6c.zip
Working on being able to render :text with layouts
Diffstat (limited to 'actionpack/lib/action_controller/new_base/renderer.rb')
-rw-r--r--actionpack/lib/action_controller/new_base/renderer.rb13
1 files changed, 7 insertions, 6 deletions
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