Module: Stall::Models::ProductCategory

Extended by:
ActiveSupport::Concern
Included in:
ProductCategory
Defined in:
app/models/stall/models/product_category.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#all_child_productsObject



21
22
23
# File 'app/models/stall/models/product_category.rb', line 21

def all_child_products
  ::Product.where(product_category_id: ([id] + descendant_ids))
end