You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
so I can then write {{ my_thingy.name }}, render it with a context like { 'my_thingy' => some_thingy }, and get the right output.
Since upgrading from liquid 5.4.0 to 5.5.0, I've noticed a problem with one of my models that happens to have an attribute named context. Whenever I render some liquid involving that model, it updates the value of context to a Liquid::Context (or a string like "#<Liquid::Context:0x000073767f8c1540>"), even if I'm not doing {{ my_thingy.context }}. This has caused problems where I end up with incorrect values of context in the database.
I suspect this is an unintended side effect of a5e5fab. Would it be possible to limit that change to only set variable.context if variable is a Liquid::Drop, not some arbitrary other type of record?
Thanks for your time!
The text was updated successfully, but these errors were encountered:
Background: I have a Rails app with several classes that are used in Liquid rendering like this:
so I can then write
{{ my_thingy.name }}
, render it with a context like{ 'my_thingy' => some_thingy }
, and get the right output.Since upgrading from liquid 5.4.0 to 5.5.0, I've noticed a problem with one of my models that happens to have an attribute named
context
. Whenever I render some liquid involving that model, it updates the value ofcontext
to aLiquid::Context
(or a string like"#<Liquid::Context:0x000073767f8c1540>"
), even if I'm not doing{{ my_thingy.context }}
. This has caused problems where I end up with incorrect values ofcontext
in the database.I suspect this is an unintended side effect of a5e5fab. Would it be possible to limit that change to only set
variable.context
ifvariable
is aLiquid::Drop
, not some arbitrary other type of record?Thanks for your time!
The text was updated successfully, but these errors were encountered: