Module: TagOcelot::ActiveRecord::ClassMethods

Defined in:
lib/tag_ocelot/active_record.rb

Instance Method Summary collapse

Instance Method Details

#has_many_tagsObject

Set up the underlying tag associations in the model



22
23
24
25
26
27
# File 'lib/tag_ocelot/active_record.rb', line 22

def has_many_tags
  has_many :taggings, :class_name => 'TagOcelot::Tagging',
    :as => :taggable, :dependent => :destroy
  has_many :tags,     :class_name => 'TagOcelot::Tag',
    :through => :taggings
end