lib/express_templates/components/capabilities/parenting.rb in express_templates-0.3.6 vs lib/express_templates/components/capabilities/parenting.rb in express_templates-0.4.0

- old
+ new

@@ -38,14 +38,19 @@ def children @children ||= [] end def children=(children) - @children =children + @children = children + children.each do |child| + if child.kind_of?(Adoptable) + child.parent = self + end + end end def compile - null_wrapped_children = "null_wrap { #{compile_children} }" + null_wrapped_children = "null_wrap(%q(#{compile_children}))" wrap_children_src = self.class[:markup].source.gsub(/(\s)_yield(\s)/, '\1'+null_wrapped_children+'\2') _compile_fragment(Proc.from_source(wrap_children_src)) end def compile_children \ No newline at end of file