Module Cms::Behaviors::Taggable::MacroMethods
In: lib/cms/behaviors/taggable.rb

Methods

Included Modules

InstanceMethods

Public Instance methods

[Source]

    # File lib/cms/behaviors/taggable.rb, line 11
11:         def is_taggable(options={})
12:           @is_taggable = true
13:           @tag_separator = options[:separator] || " "
14:           
15:           has_many :taggings, :as => :taggable
16:           has_many :tags, :through => :taggings, :order => "tags.name"                    
17:           
18:           named_scope :tagged_with, lambda{|t| {:include => {:taggings => :tag}, :conditions => ["tags.name = ?", t]} }          
19:                     
20:           after_save :save_tags          
21:                     
22:           extend ClassMethods
23:           include InstanceMethods
24:         end

[Source]

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

[Validate]