Module: ActiveRecord::Acts::Tagger::ClassMethods

Defined in:
lib/acts_as_taggable_on/acts_as_tagger.rb

Instance Method Summary collapse

Instance Method Details

#acts_as_tagger(opts = {}) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/acts_as_taggable_on/acts_as_tagger.rb', line 9

def acts_as_tagger(opts={})
  has_many :owned_taggings, opts.merge(:as => :tagger, :dependent => :destroy, 
                                       :include => :tag, :class_name => "Tagging")
  has_many :owned_tags, :through => :owned_taggings, :source => :tag, :uniq => true
  include ActiveRecord::Acts::Tagger::InstanceMethods
  extend ActiveRecord::Acts::Tagger::SingletonMethods       
end

#is_tagger?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/acts_as_taggable_on/acts_as_tagger.rb', line 17

def is_tagger?
  false
end