title: rails joins polymorphic association
body: <p>I have a ploymorphic association named <code>Notifiable</code> in a model named <code>Notifiaction</code>:</p>
  
  <pre><code>module Notifiable
    def self.included(base)
      base.instance_eval do
        has_many :notifications, :as =&gt; :notifiable, :inverse_of =&gt; :notifiable, :dependent =&gt; :destroy
      end
    end
  end
  
  class Bill &lt; ActiveRecord::Base
    include Notifiable
  end
  
  class Balance &lt; ActiveRecord::Base
    include Notifiable
  end
  
  class Notification
    belongs_to :notifiable, :polymorphic =&gt; true
    belongs_to :bill, foreign_key: 'notifiable_id', conditions: "notifiable_type = 'Bill'"
    belongs_to :balance, foreign_key: 'notifiable_id', conditions: "notifiable_type = 'Balance'"
  end
  </code></pre>
  
  <p>when I try to join notification with notifiable (<code>Notification.joins{notifiable}</code> - it's squeel, active record code will have the same result) I get the error: <code>ActiveRecord::EagerLoadPolymorphicError: Can not eagerly load the polymorphic association :notifiable</code></p>
  
  <p>I've seen some posts about this exception but none of them was exactly my case when I try to just join the tables. Is it possible? what am I missing</p>