Module Cms::Behaviors::Categorizing::MacroMethods
In: lib/cms/behaviors/categorizing.rb

Methods

Included Modules

InstanceMethods

Public Instance methods

[Source]

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

[Source]

    # File lib/cms/behaviors/categorizing.rb, line 8
 8:         def belongs_to_category?
 9:           !!@belongs_to_category
10:         end

[Validate]