Implicit variable scoping

This commit is contained in:
Florian Weingarten
2019-04-11 10:25:52 +01:00
parent b3b63a683f
commit af614f3a2e
15 changed files with 102 additions and 161 deletions

View File

@@ -15,7 +15,7 @@ class CommentForm < Liquid::Block
def render(context)
article = context[@variable_name]
context.stack do
context.stack('form') do
context['form'] = {
'posted_successfully?' => context.registers[:posted_successfully],
'errors' => context['comment.errors'],

View File

@@ -24,7 +24,7 @@ class Paginate < Liquid::Block
def render(context)
@context = context
context.stack do
context.stack('paginate') do
current_page = context['current_page'].to_i
pagination = {