lib/stache/handlebars/handler.rb in stache-1.0.3 vs lib/stache/handlebars/handler.rb in stache-1.1.0

- old
+ new

@@ -32,22 +32,22 @@ handlebars.register_helper('yield') do |name, *args| content_for(:layout) end - template = handlebars.compile('#{template.source.gsub(/'/, "\\\\'")}'); + template = handlebars.compile('#{template.source.gsub(/'/, "\\\\'")}') vars = {} partial_renderer = PartialRenderer.new(lookup_context) vars.merge!(@_assigns) - vars.merge!(partial_renderer.instance_variable_get('@locals') || {}) + vars.merge!(local_assigns || {}) options = partial_renderer.instance_variable_get('@options') vars.merge!(options[:context] || {}) if options handlebars.partial_missing do |name| search_path = '#{template.virtual_path}'.split("/")[0..-2] file = (search_path + [name]).join("/") finder = lambda do |partial| - self.lookup_context.find(file, [], partial, [], {:formats => [:html]}) + self.lookup_context.find(file, [], partial, [], {formats: [:html]}) end template = finder.call(false) rescue finder.call(true) if template t = handlebars.compile(template.source) \ No newline at end of file