aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view
diff options
context:
space:
mode:
authorŁukasz Strzałkowski <lukasz.strzalkowski@gmail.com>2013-07-19 12:02:09 +0200
committerŁukasz Strzałkowski <lukasz.strzalkowski@gmail.com>2013-08-25 11:39:11 +0200
commit1656f58f073582e56184d40584f2ce893ab57497 (patch)
tree5594b501971e469e80782a538af83536ab7c2c39 /actionview/lib/action_view
parent718332536c4f6c715a7b77f68749e4c75f8a6eae (diff)
downloadrails-1656f58f073582e56184d40584f2ce893ab57497.tar.gz
rails-1656f58f073582e56184d40584f2ce893ab57497.tar.bz2
rails-1656f58f073582e56184d40584f2ce893ab57497.zip
Improve AV::Rendering docs
Diffstat (limited to 'actionview/lib/action_view')
-rw-r--r--actionview/lib/action_view/rendering.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/actionview/lib/action_view/rendering.rb b/actionview/lib/action_view/rendering.rb
index ee7cc4e470..9d8f316a11 100644
--- a/actionview/lib/action_view/rendering.rb
+++ b/actionview/lib/action_view/rendering.rb
@@ -71,24 +71,28 @@ module ActionView
end
# Returns an object that is able to render templates.
+ # :api: private
def view_renderer
@_view_renderer ||= ActionView::Renderer.new(lookup_context)
end
- # Normalize arguments, options and then delegates render_to_body and
- # sticks the result in self.response_body.
+ # Render template to response_body
+ # :api: public
def render(*args, &block)
super
options = _normalize_render(*args, &block)
self.response_body = render_to_body(options)
end
+ # Raw rendering of a template to a string.
+ # :api: public
def render_to_string(*args, &block)
options = _normalize_render(*args, &block)
render_to_body(options)
end
# Raw rendering of a template.
+ # :api: public
def render_to_body(options = {})
_process_options(options)
_render_template(options)
@@ -117,6 +121,7 @@ module ActionView
# Normalize args by converting render "foo" to render :action => "foo" and
# render "foo/bar" to render :file => "foo/bar".
+ # :api: private
def _normalize_args(action=nil, options={})
options = super(action, options)
case action
@@ -135,6 +140,7 @@ module ActionView
end
# Normalize options.
+ # :api: private
def _normalize_options(options)
options = super(options)
if options[:partial] == true