Essence: there are several tables (fields partially coincide) channels, films, serials, with the corresponding models, you need to get all the records from these tables at once, which correspond to some condition.
The solution with join `s is not very suitable. With a polymorphic connection, I don’t understand how to get several values namely serials \ films \ channels, and not all_content.
class AllContent < ActiveRecord::Base belongs_to :content, polymorphic: true end class Serial < ActiveRecord::Base has_one :all_contents, as: :content end One value is clear
AllContent.first.content What are the solutions to this problem?