diff options
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r-- | actionpack/lib/action_view/renderer/partial_renderer.rb | 1 | ||||
-rw-r--r-- | actionpack/lib/action_view/renderer/renderer.rb | 14 | ||||
-rw-r--r-- | actionpack/lib/action_view/renderer/template_renderer.rb | 2 |
3 files changed, 3 insertions, 14 deletions
diff --git a/actionpack/lib/action_view/renderer/partial_renderer.rb b/actionpack/lib/action_view/renderer/partial_renderer.rb index 36d557e1a3..f5fdf766ad 100644 --- a/actionpack/lib/action_view/renderer/partial_renderer.rb +++ b/actionpack/lib/action_view/renderer/partial_renderer.rb @@ -1,4 +1,3 @@ - module ActionView # = Action View Partials # diff --git a/actionpack/lib/action_view/renderer/renderer.rb b/actionpack/lib/action_view/renderer/renderer.rb index dfef43bc9d..30a0c4be70 100644 --- a/actionpack/lib/action_view/renderer/renderer.rb +++ b/actionpack/lib/action_view/renderer/renderer.rb @@ -33,22 +33,12 @@ module ActionView # Direct accessor to template rendering. def render_template(context, options) #:nodoc: - _template_renderer.render(context, options) + TemplateRenderer.new(@lookup_context).render(context, options) end # Direct access to partial rendering. def render_partial(context, options, &block) #:nodoc: - _partial_renderer.render(context, options, block) - end - - private - - def _template_renderer #:nodoc: - TemplateRenderer.new(@lookup_context) - end - - def _partial_renderer #:nodoc: - PartialRenderer.new(@lookup_context) + PartialRenderer.new(@lookup_context).render(context, options, block) end end end diff --git a/actionpack/lib/action_view/renderer/template_renderer.rb b/actionpack/lib/action_view/renderer/template_renderer.rb index 2a5ea5a711..4d5c5db80c 100644 --- a/actionpack/lib/action_view/renderer/template_renderer.rb +++ b/actionpack/lib/action_view/renderer/template_renderer.rb @@ -41,7 +41,7 @@ module ActionView # Renders the given template. A string representing the layout can be # supplied as well. - def render_template(template, layout_name = nil, locals = {}) #:nodoc: + def render_template(template, layout_name = nil, locals = nil) #:nodoc: view, locals = @view, locals || {} render_with_layout(layout_name, locals) do |layout| |