Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def is_descendant_of?(other_page)
- return false unless other_page and page
- page == other_page or page.is_descendant_of? other_page
- end
- def is_ancestor_of?(other_page)
- other_page.is_descendant_of? self
- end
Add Comment
Please, Sign In to add comment