Guest User

Untitled

a guest
Oct 21st, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. def is_descendant_of?(other_page)
  2. return false unless other_page and page
  3. page == other_page or page.is_descendant_of? other_page
  4. end
  5.  
  6. def is_ancestor_of?(other_page)
  7. other_page.is_descendant_of? self
  8. end
Add Comment
Please, Sign In to add comment