title: Find your way up the polymorphic tree to one parent
body: <p>I have a simple polymorphic association</p>
  
  <pre><code>#comment.rb
  belongs_to :commentable, :polymorphic =&gt; true
  has_many :comments, :as =&gt; :commentable
  #post.rb
  has_many  :comments, :as =&gt; :commentable                                        
  accepts_nested_attributes_for :comments, :allow_destroy =&gt; true
  </code></pre>
  
  <p>So in IRB I can do, Post.comments, or Comment.comments.</p>
  
  <p>But how can I find the parent post? </p>
  
  <p>As in Comment.post ?</p>
  
  <p>I can currently get their by doing a series of <code>.commentable</code>'s. For example :</p>
  
  <pre><code>Comment.find(1).commentable.commentable
  =&gt; Post(:id =&gt; ...
  </code></pre>