Use alexis-renard fork with to_html
fix
#4
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
From
mustache.js
version 4.0.0,.to_html
has been removed.jquery.mustache.js
has not yet been updated to not use.to_html
. There's a PR but it hasn't been merged.But as things stand, doing something like
$('body').mustache('simple-hello', viewData)
will fail with the combination ofmustache.js
andjquery.mustache.js
that ships inmustache-js-rails
version 4.1.0. I think this will also be true of version 4.0.0 and 4.0.1, though I've not tested them myself. The error reported in DevTools is something likeUncaught TypeError: getMustache(...).to_html is not a function
Reverting to 3.1.0.1 fixes things for me, but here's a PR that includes the fix. If the fix gets merged in to
jquery.mustache.js
you could switch back, but it's looking close to unmaintained at this point.This PR updates the submodule dependency and also manually updates the vendored copy of
jquery.mustache.js
:jquery.mustache.js/src/jquery.mustache.js
has the.to_html
change butjquery.mustache.js/jquery.mustache.js
has not been regenerated and so we can't userake
to update the vendored assets.