Class ProductCategory
In: app/models/product_category.rb
Parent: Category

Methods

Public Class methods

[Source]

    # File app/models/product_category.rb, line 10
10:   def self.menu_categories(top_category, env)
11:     top_category ? top_category.children : top_level_for(env).select{|c|c.kind_of?(ProductCategory)}
12:   end

Public Instance methods

[Source]

   # File app/models/product_category.rb, line 6
6:   def all_products
7:     Product.find(:all, :conditions => { :product_category_id => (all_children << self).map(&:id) })
8:   end

[Validate]