Method: Cms::Behaviors::Categorizing::MacroMethods#belongs_to_category
- Defined in:
- lib/cms/behaviors/categorizing.rb
#belongs_to_category ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/cms/behaviors/categorizing.rb', line 11 def belongs_to_category @belongs_to_category = true extend ClassMethods include InstanceMethods belongs_to :category named_scope :in_category, lambda{|cat| {:conditions => ["category_id = ?", cat.id]}} end |