Skip to content

Commit 0134ca6

Browse files
Remove private partial/template renderer methods
Since now these objects are not cached anymore, there's no need to have these private methods, just instantiate each of them in the necessary place.
1 parent a9aeba6 commit 0134ca6

File tree

3 files changed

+3
-14
lines changed

3 files changed

+3
-14
lines changed

actionpack/lib/action_view/renderer/partial_renderer.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
module ActionView
32
# = Action View Partials
43
#

actionpack/lib/action_view/renderer/renderer.rb

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,12 @@ def render_body(context, options)
3333

3434
# Direct accessor to template rendering.
3535
def render_template(context, options) #:nodoc:
36-
_template_renderer.render(context, options)
36+
TemplateRenderer.new(@lookup_context).render(context, options)
3737
end
3838

3939
# Direct access to partial rendering.
4040
def render_partial(context, options, &block) #:nodoc:
41-
_partial_renderer.render(context, options, block)
42-
end
43-
44-
private
45-
46-
def _template_renderer #:nodoc:
47-
TemplateRenderer.new(@lookup_context)
48-
end
49-
50-
def _partial_renderer #:nodoc:
51-
PartialRenderer.new(@lookup_context)
41+
PartialRenderer.new(@lookup_context).render(context, options, block)
5242
end
5343
end
5444
end

actionpack/lib/action_view/renderer/template_renderer.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def determine_template(options) #:nodoc:
4141

4242
# Renders the given template. A string representing the layout can be
4343
# supplied as well.
44-
def render_template(template, layout_name = nil, locals = {}) #:nodoc:
44+
def render_template(template, layout_name = nil, locals = nil) #:nodoc:
4545
view, locals = @view, locals || {}
4646

4747
render_with_layout(layout_name, locals) do |layout|

0 commit comments

Comments
 (0)