Implicit variable scoping

This commit is contained in:
Florian Weingarten
2019-04-25 10:28:43 -04:00
parent b3b63a683f
commit af614f3a2e
15 changed files with 102 additions and 161 deletions
+1 -1
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'],
+1 -1
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 = {