Skip to content

Commit

Permalink
fix compile
Browse files Browse the repository at this point in the history
  • Loading branch information
le0pard committed Mar 9, 2014
1 parent 504b512 commit c01389d
Show file tree
Hide file tree
Showing 2 changed files with 356 additions and 391 deletions.
2 changes: 1 addition & 1 deletion lib/smt_rails/tilt.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def evaluate(scope, locals, &block)
(function() {
#{namespace} || (#{namespace} = {});
#{namespace}Cache || (#{namespace}Cache = {});
#{namespace}Cache[#{template_key.inspect}] = Mustache.parse(#{data.inspect});
#{namespace}Cache[#{template_key.inspect}] = Mustache.compile(#{data.inspect});

This comment has been minimized.

Copy link
@joshgoebel

joshgoebel Oct 21, 2015

Just running into this, why did it get reverted? Seems the new Mustache API is parse, yes?

This comment has been minimized.

Copy link
@le0pard

le0pard Oct 21, 2015

Author Member

I depend from mustache.js version - our current have compile, new versions change this again https://github.com/railsware/smt_rails/blob/master/vendor/assets/javascripts/mustache.js#L490-L496

You can submit PR with new js lib

This comment has been minimized.

Copy link
@joshgoebel

joshgoebel Oct 21, 2015

Were you going to release 0.2.8 then with the vendored mustaches?

This comment has been minimized.

Copy link
@le0pard

le0pard Oct 21, 2015

Author Member

All releases contain vendored mustaches

This comment has been minimized.

Copy link
@joshgoebel

joshgoebel Oct 21, 2015

Ah, so perhaps my issue is this project is also including the mustachejs gem when it should not be. :-)

Let me remove that and see if it works.

Mustache.compilePartial(#{template_key.inspect}, #{data.inspect});
#{namespace}[#{template_key.inspect}] = function(object) {
Expand Down
Loading

0 comments on commit c01389d

Please sign in to comment.