We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
class Adv < ApplicationRecord belongs_to :cat end class Cat < ApplicationRecord has_closure_tree has_many :advs def indirect_advs Adv.where(:cat_id => descendant_ids) end end