Improve wording in readme code block comment
This commit is contained in:
parent
3e493e93c5
commit
dc74057409
@ -43,7 +43,7 @@ require 'liquid_dynamic_context'
|
|||||||
|
|
||||||
# /app/messages/resolvers/user_binding_resolver.rb
|
# /app/messages/resolvers/user_binding_resolver.rb
|
||||||
class UserBindingResolver < LiquidDynamicContext::BindingResolver
|
class UserBindingResolver < LiquidDynamicContext::BindingResolver
|
||||||
# first we have state the bindings that this resolver can provide
|
# first we have to declare the bindings that this resolver can provide
|
||||||
register_binding :email, :username
|
register_binding :email, :username
|
||||||
|
|
||||||
protected
|
protected
|
||||||
@ -82,7 +82,7 @@ LIQUID
|
|||||||
# which knows about all our available resolvers
|
# which knows about all our available resolvers
|
||||||
template_context = LiquidDynamicContext::TemplateContext.new([UserBindingResolver.new])
|
template_context = LiquidDynamicContext::TemplateContext.new([UserBindingResolver.new])
|
||||||
|
|
||||||
# Remember that we can pass dynamic attributes to the context to resolve data on
|
# Remember that we can pass dynamic attributes to the resolvers to assign data on
|
||||||
# the fly, in this example we are going to pass in the current_user_id via a hash
|
# the fly, in this example we are going to pass in the current_user_id via a hash
|
||||||
models = {
|
models = {
|
||||||
current_user_id: 4902,
|
current_user_id: 4902,
|
||||||
|
Loading…
Reference in New Issue
Block a user