lib/volt/page/reactive_template.rb in volt-0.5.18 vs lib/volt/page/reactive_template.rb in volt-0.6.0
- old
+ new
@@ -1,12 +1,12 @@
class ReactiveTemplate
include Events
- def initialize(context, template_path)
+ def initialize(page, context, template_path)
# puts "New Reactive Template: #{context.inspect} - #{template_path.inspect}"
@template_path = template_path
@target = AttributeTarget.new
- @template = TemplateRenderer.new(@target, context, "main", template_path)
+ @template = TemplateRenderer.new(page, @target, context, "main", template_path)
end
def event_added(event, scope_provider, first)
if first && !@template_listener
@template_listener = @target.on('changed') { update }
\ No newline at end of file