diff options
author | Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com> | 2009-04-29 12:19:17 -0700 |
---|---|---|
committer | Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com> | 2009-05-01 17:31:01 -0700 |
commit | 4f68311685831b940936130203c240fa23525c84 (patch) | |
tree | 5fc1192c04bdef4b198a92c511f2a7a5d0e09bc3 /actionpack/lib/action_controller/new_base | |
parent | 1b459916039259383808625d1758a8bc4a4516d9 (diff) | |
download | rails-4f68311685831b940936130203c240fa23525c84.tar.gz rails-4f68311685831b940936130203c240fa23525c84.tar.bz2 rails-4f68311685831b940936130203c240fa23525c84.zip |
Finished implementing render :text in Base2
Diffstat (limited to 'actionpack/lib/action_controller/new_base')
-rw-r--r-- | actionpack/lib/action_controller/new_base/base.rb | 8 | ||||
-rw-r--r-- | actionpack/lib/action_controller/new_base/renderer.rb | 2 |
2 files changed, 3 insertions, 7 deletions
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) |