Handlebars partials and their context: what a joke.
@ericf Partials were mostly a mistake (cribbed from Mustache). I prefer helpers that can manage context.
-
-
@wycats Yeah, I had to switch to that. Couldn’t use `../` in the partial. -
@ericf it's generally bad practice to have a chunk of reusable code that relies on specific variables being present in the calling env -
@wycats yeah, agreed. I was confused why “../” didn’t work when in a partial, I simply created a helper to get the context I needed first. -
@ericf believe it or not, it's intentional (for the reason I described in the previous tweet) -
@wycats yeah, I see how it makes sense for partials and their context to work that way. It just screwed me up at first.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.