aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/abstract_controller/rendering.rb
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2010-04-06 15:38:05 -0700
committerXavier Noria <fxn@hashref.com>2010-04-06 15:38:05 -0700
commit4c4fd1a60ff1c060e76e9ee540074756510f53ea (patch)
tree77da1c66c127e36c8b00825b676d9267a9ef4cd6 /actionpack/lib/abstract_controller/rendering.rb
parent03cb74b9461293b96ae0add8ff5efda132dabba0 (diff)
parentaf130575249571464ec984efa84fcea1267e8cf8 (diff)
downloadrails-4c4fd1a60ff1c060e76e9ee540074756510f53ea.tar.gz
rails-4c4fd1a60ff1c060e76e9ee540074756510f53ea.tar.bz2
rails-4c4fd1a60ff1c060e76e9ee540074756510f53ea.zip
Merge commit 'rails/master'
Diffstat (limited to 'actionpack/lib/abstract_controller/rendering.rb')
-rw-r--r--actionpack/lib/abstract_controller/rendering.rb17
1 files changed, 8 insertions, 9 deletions
diff --git a/actionpack/lib/abstract_controller/rendering.rb b/actionpack/lib/abstract_controller/rendering.rb
index b251bd6405..98c8c5fa67 100644
--- a/actionpack/lib/abstract_controller/rendering.rb
+++ b/actionpack/lib/abstract_controller/rendering.rb
@@ -89,9 +89,16 @@ module AbstractController
# Normalize arguments, options and then delegates render_to_body and
# sticks the result in self.response_body.
def render(*args, &block)
+ self.response_body = render_to_string(*args, &block)
+ end
+
+ # Raw rendering of a template to a string. Just convert the results of
+ # render_to_body into a String.
+ # :api: plugin
+ def render_to_string(*args, &block)
options = _normalize_args(*args, &block)
_normalize_options(options)
- self.response_body = render_to_body(options)
+ render_to_body(options)
end
# Raw rendering of a template to a Rack-compatible body.
@@ -101,14 +108,6 @@ module AbstractController
_render_template(options)
end
- # Raw rendering of a template to a string. Just convert the results of
- # render_to_body into a String.
- # :api: plugin
- def render_to_string(options={})
- _normalize_options(options)
- render_to_body(options)
- end
-
# Find and renders a template based on the options given.
# :api: private
def _render_template(options) #:nodoc: