I would handle these like you handled the previous scopes:

```ruby
scope :ancestor_nodes, lambda { joins(:ancestor) }
scope :descendant_nodes, lambda { joins(:descendant) }
```