[Rails Notes] Doubly polymorphic has_many: :through association
Double-ended polymorphic has_many: :through association in Ruby on Rails.
Double-ended polymorphic has_many: :through association in Ruby on Rails.
Rails Concern can be helpful to DRY code under certain circumstances. Here is also an example of wrapping polymorphic has_many through association.