lib/ice/eco_template/base.rb in ice-0.4.1 vs lib/ice/eco_template/base.rb in ice-0.4.2

- old
+ new

@@ -4,10 +4,11 @@ module Ice module EcoTemplate def self.convert_template(template_text, vars = {}) + V8::C::Locker() do context = V8::Context.new context.eval(open "#{File.dirname(__FILE__)}/../../../js/lib/path-helper.js") IceJavascriptHelpers.each do |helper| context.eval(helper) @@ -19,8 +20,9 @@ context.eval CoffeeScript.compile(GeneratedHelpers.get_routes, :bare => true) context.eval(Eco::Source.combined_contents) template = context["eco"]["compile"].call(template_text) template.call(vars.to_ice) + end end end -end \ No newline at end of file +end