title: How to get all the descendants of an object in Ruby on Rails
body: <p>I'm have models related as follows:</p>
  
  <pre><code>GrandParent 
    has_many :kids
    has_many :grand_children, through: :kids
  Kid 
    belongs_to :grand_parent
    has_many :grand_kids
  GrandKid
    belongs_to :kid
  </code></pre>
  
  <p>I would just like to call .descendants on an object, and get all the objects that belong to its 'lineage'. </p>
  
  <p>I thought that using the ancestry gem would give me the .descendants method I wanted, but it only creates an additional index on a single class, allowing you to get descendants within said class.(great for things like comments &amp; replies, but not useful for my problem) My code is not really necessary to understand the problem, but here it is for those interested: <a href="https://gist.github.com/bjlinville1/8425bfe88bc7060209e8" rel="nofollow">https://gist.github.com/bjlinville1/8425bfe88bc7060209e8</a></p>