lib/zafu/node_context.rb in zafu-0.8.3 vs lib/zafu/node_context.rb in zafu-0.8.4

- old
+ new

@@ -50,10 +50,11 @@ # You can also use an 'after_class' parameter to move up in the current object's class hierarchy to get # ivar name (see #master_class). def as_main(after_class = nil) klass = after_class ? master_class(after_class) : single_class res = self.class.new("@#{klass.to_s.underscore}", single_class, nil) + res.propagate_dom_scope! if @dom_scope res.dom_prefix = self.dom_prefix res end # Find the class just afer 'after_class' in the class hierarchy. @@ -174,10 +175,10 @@ end protected # List of scopes defined in ancestry (used to generate dom_id). def dom_scopes - return [@saved_dom_id] if @saved_dom_id + return [@saved_dom_id] if @dom_scope && @saved_dom_id if @up scopes = @up.dom_scopes if @dom_scope (scopes.empty? ? [dom_prefix] : scopes) + [make_scope_id] else \ No newline at end of file