I struggled to find examples that match my needs, after a few research here's what I found, hope it can help you too.
Here's an example with three models which have belongs_to
and has_many
associations with two polymorphic models 🔥
class Quotation < ActiveRecord::Base
belongs_to :ticket
has_many :documents, as: :documentable
end