Closed doowb closed 8 years ago
maybe we should add a couple more tests with variables passed to the functions, etc. like <%= a(foo) %>
I added a couple more tests last night that test using the data passed in directly and using it in combination with this
inside the helper.
I discovered that the interpolation method fails when using this
because the context isn't bound to the functions at that point. The code then falls through to the .render
method where the context is bound.
If you're good with it feel free to merge, thanks!
Returns the value from render. Adds test.
The main issue was that if the returned results from a function happened to be a property on the data context, then the value of that property was returned instead of the expected value (from the function).
Let me know if this looks like the correct approach. It might be that we should change this line to: