Sha256: 84c030f45ac1c10f7f37217be5d6aaf3095cbd6cdd2cc13d4e8d4e748ff01c7c
Contents?: true
Size: 442 Bytes
Versions: 1
Compression:
Stored size: 442 Bytes
Contents
module Unidom::Category::Concerns::AsAncestorCategory extend ActiveSupport::Concern included do |includer| has_many :descendant_category_rollups, class_name: 'Unidom::Category::CategoryRollup', foreign_key: :ancestor_category_id, source: :ancestor_category has_many :descendant_categories, class_name: 'Unidom::Category::Category', through: :descendant_category_rollups end module ClassMethods end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
unidom-category-1.3 | app/models/unidom/category/concerns/as_ancestor_category.rb |