Use super rather than render_all in single block render classes.

This commit is contained in:
Dylan Thacker-Smith
2014-09-12 16:58:07 -04:00
parent 478eb893a9
commit 0573b63b4c
3 changed files with 3 additions and 5 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ module Liquid
def render(context) def render(context)
context.stack do context.stack do
output = render_all(@nodelist, context) output = super
if output != context.registers[:ifchanged] if output != context.registers[:ifchanged]
context.registers[:ifchanged] = output context.registers[:ifchanged] = output
+1 -1
View File
@@ -54,7 +54,7 @@ module Liquid
col += 1 col += 1
result << "<td class=\"col#{col}\">" << render_all(@nodelist, context) << '</td>' result << "<td class=\"col#{col}\">" << super << '</td>'
if col == cols and (index != length - 1) if col == cols and (index != length - 1)
col = 0 col = 0
+1 -3
View File
@@ -4,8 +4,6 @@ class Paginate < Liquid::Block
def initialize(tag_name, markup, options) def initialize(tag_name, markup, options)
super super
@nodelist = []
if markup =~ Syntax if markup =~ Syntax
@collection_name = $1 @collection_name = $1
@page_size = if $2 @page_size = if $2
@@ -73,7 +71,7 @@ class Paginate < Liquid::Block
end end
end end
render_all(@nodelist, context) super
end end
end end