barber upgrade, get assets precompile working on 1.9

This commit is contained in:
Sam 2014-12-11 14:52:42 +11:00 committed by Robin Ward
parent 51c4cb3de1
commit 8be2cb061e
2 changed files with 3 additions and 7 deletions

View File

@ -41,10 +41,10 @@ GEM
activerecord (>= 2.3.0)
rake (>= 0.8.7)
arel (5.0.1.20140414130214)
barber (0.4.2)
barber (0.5.0)
ember-source
execjs
handlebars-source
handlebars-source (>= 1.0.0.rc.4)
better_errors (2.0.0)
coderay (>= 1.0.0)
erubis (>= 2.6.6)

View File

@ -4,10 +4,6 @@
module Barber
class EmberCompatPrecompiler < Barber::Precompiler
def self.call(template)
"Handlebars.template(#{compile(template)})"
end
def sources
[handlebars, precompiler]
end
@ -18,7 +14,7 @@ module Barber
#{File.read(Rails.root + "app/assets/javascripts/discourse/lib/ember_compat_handlebars.js")}
var Barber = {
precompile: function(string) {
return Discourse.EmberCompatHandlebars.precompile(string).toString();
return Discourse.EmberCompatHandlebars.precompile(string,false).toString();
}
};
END