title: has many relationship for polymorphic association
body: <pre><code>class Sample
    has_many :pictures
  end
  
  class Picture &lt; ApplicationRecord
    belongs_to :imageable, polymorphic: true
    belongs_to :sample
  end
  
  
  class Employee &lt; ApplicationRecord
    has_many :pictures, as: :imageable
  end
  
  class Product &lt; ApplicationRecord
    has_many :pictures, as: :imageable
  end
  </code></pre>
  
  <p>What should be the association to get all product or employee of a given sample.
  <code>Sample.first.pictures.map(&amp;:imageable)</code>. I want to get it as an activerecord association. </p>