Module: TagEal::ActiveRecord::ClassMethods

Defined in:
lib/tag_eal/active_record.rb

Instance Method Summary collapse

Instance Method Details

#has_many_tagsObject

Set up the underlying tag associations in the model



9
10
11
12
13
14
# File 'lib/tag_eal/active_record.rb', line 9

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