From 4f68311685831b940936130203c240fa23525c84 Mon Sep 17 00:00:00 2001 From: Yehuda Katz + Carl Lerche Date: Wed, 29 Apr 2009 12:19:17 -0700 Subject: Finished implementing render :text in Base2 --- actionpack/lib/action_controller/new_base/base.rb | 8 ++------ actionpack/lib/action_controller/new_base/renderer.rb | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) (limited to 'actionpack/lib/action_controller/new_base') diff --git a/actionpack/lib/action_controller/new_base/base.rb b/actionpack/lib/action_controller/new_base/base.rb index 6711cd932a..9f7a148b3c 100644 --- a/actionpack/lib/action_controller/new_base/base.rb +++ b/actionpack/lib/action_controller/new_base/base.rb @@ -40,23 +40,19 @@ module ActionController controller.call(env).to_rack end - # :api: plugin - def response_body=(body) - @_response.body = body - end - # :api: private def call(env) @_request = ActionDispatch::Request.new(env) @_response = ActionDispatch::Response.new process(@_request.parameters[:action]) + @_response.body = response_body @_response.prepare! self end # :api: private def to_rack - response.to_a + @_response.to_a end end end diff --git a/actionpack/lib/action_controller/new_base/renderer.rb b/actionpack/lib/action_controller/new_base/renderer.rb index ed34c46aed..9a965c18e8 100644 --- a/actionpack/lib/action_controller/new_base/renderer.rb +++ b/actionpack/lib/action_controller/new_base/renderer.rb @@ -17,7 +17,7 @@ module ActionController _process_options(options) - self.response_body = render_to_body(options) + super(options) end def render_to_body(options) -- cgit v1.2.3