liquid without the garbage

This commit is contained in:
Florian Weingarten
2019-04-22 16:34:31 -04:00
parent c2ef247be5
commit 2a1ca3152d
25 changed files with 144 additions and 101 deletions
+6 -6
View File
@@ -1,19 +1,19 @@
module Liquid
class BlockBody
def render_node_with_profiling(node, output, context, skip_output = false)
def render_node_with_profiling(context, output, node)
Profiler.profile_node_render(node) do
render_node_without_profiling(node, output, context, skip_output)
render_node_without_profiling(context, output, node)
end
end
alias_method :render_node_without_profiling, :render_node_to_output
alias_method :render_node_to_output, :render_node_with_profiling
alias_method :render_node_without_profiling, :render_node
alias_method :render_node, :render_node_with_profiling
end
class Include < Tag
def render_with_profiling(context)
def render_with_profiling(context, output)
Profiler.profile_children(context.evaluate(@template_name_expr).to_s) do
render_without_profiling(context)
render_without_profiling(context, output)
end
end