aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/abstract/renderer.rb
diff options
context:
space:
mode:
authorYehuda Katz <wycats@gmail.com>2009-08-06 19:45:40 -0300
committerYehuda Katz <wycats@gmail.com>2009-08-06 19:45:40 -0300
commitaf375a5eb3aba149590be1636480e1c3976c124f (patch)
tree250d682085fe30291a47ee38cf19e6ddca7b68f3 /actionpack/lib/action_controller/abstract/renderer.rb
parentf0945409d935cdd3cb783a728d68414e7ca02dfc (diff)
downloadrails-af375a5eb3aba149590be1636480e1c3976c124f.tar.gz
rails-af375a5eb3aba149590be1636480e1c3976c124f.tar.bz2
rails-af375a5eb3aba149590be1636480e1c3976c124f.zip
Replace _action_view with view_context to reflect that it is public and that it does not need to be an ActionView instance
Diffstat (limited to 'actionpack/lib/action_controller/abstract/renderer.rb')
-rw-r--r--actionpack/lib/action_controller/abstract/renderer.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/lib/action_controller/abstract/renderer.rb b/actionpack/lib/action_controller/abstract/renderer.rb
index f3e3903a3b..fe556281ab 100644
--- a/actionpack/lib/action_controller/abstract/renderer.rb
+++ b/actionpack/lib/action_controller/abstract/renderer.rb
@@ -31,8 +31,8 @@ module AbstractController
# partial<Boolean>:: Whether or not the template to render is a partial
#
# Override this method in a to change the default behavior.
- def _action_view
- @_action_view ||= ActionView::Base.for_controller(self)
+ def view_context
+ @_view_context ||= ActionView::Base.for_controller(self)
end
# Mostly abstracts the fact that calling render twice is a DoubleRenderError.
@@ -55,7 +55,7 @@ module AbstractController
def render_to_body(options = {})
# TODO: Refactor so we can just use the normal template logic for this
if options[:_partial_object]
- _action_view.render_partial(options)
+ view_context.render_partial(options)
else
_determine_template(options)
_render_template(options)
@@ -77,7 +77,7 @@ module AbstractController
# _layout<ActionView::Template>:: The layout to wrap the template in (optional)
# _partial<TrueClass, FalseClass>:: Whether or not the template to be rendered is a partial
def _render_template(options)
- _action_view.render_template(options[:_template], options[:_layout], options, options[:_partial])
+ view_context.render_template(options[:_template], options[:_layout], options, options[:_partial])
end
# The list of view paths for this controller. See ActionView::ViewPathSet for