title: Inherited Resources: can't get the parent in a polymorphic_belongs_to
body: <p>I am using Inherited Resources in my Rails application but I have an issue: </p>
  
  <p>I can't access the parent object when I use a polymorphic relation between my controllers.</p>
  
  <p>Following the documentation, I have a controller like this:</p>
  
  <pre><code>class PhotosController &lt; InheritedResources::Base
    belongs_to :user, :task, :polymorphic =&gt; true
  
    def index
      logger.debug(parent.inspect)
    end
  end
  </code></pre>
  
  <p>But parent always returns nil.
  It doesn't work either with:</p>
  
  <pre><code>polymorphic_belongs_to :user, :task 
  </code></pre>
  
  <p>However, it works if I don't use a polymorphic relation:</p>
  
  <pre><code>belongs_to :user 
  </code></pre>
  
  <p>or</p>
  
  <pre><code>belongs_to :task 
  </code></pre>
  
  <p>Note that my routes and everything else regarding inherited_resources work fine.</p>
  
  <p>I am using Rails 2.3.10 and InheritedResources 1.0.6 but some people have the same issue with Rails 3. Here is a post in the mailing list: <a href="http://groups.google.com/group/inherited_resources/browse_thread/thread/8d154492bad90f2d" rel="nofollow">http://groups.google.com/group/inherited_resources/browse_thread/thread/8d154492bad90f2d</a></p>
  
  <p>Any idea?</p>
  
  <p>Thank you</p>