Sha256: c1879b8e83c194be22ea28d10f30fecc8ee0eec536cdcb289887c13030a73db1

Contents?: true

Size: 442 Bytes

Versions: 1

Compression:

Stored size: 442 Bytes

Contents

module Unidom::Category::Concerns::AsDescendantCategory

  extend ActiveSupport::Concern

  included do |includer|

    has_many :ancestor_category_rollups, class_name: 'Unidom::Category::CategoryRollup', foreign_key: :descendant_category_id, source: :descendant_category
    has_many :ancestor_categories,       class_name: 'Unidom::Category::Category',       through:     :ancestor_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_descendant_category.rb