Sha256: a6f6409f72d95af5faf2f0cc63b17e4a418729c1162ef05fc018b995c2808d8b
Contents?: true
Size: 487 Bytes
Versions: 1
Compression:
Stored size: 487 Bytes
Contents
module EtiquetaRails::ActiveRecord def self.included(base) # include our class methods base.extend EtiquetaRails::ActiveRecord::ClassMethods end module ClassMethods # Set up the underlying tag associations in the model def has_many_tags has_many :taggings, :class_name => 'EtiquetaRails::Tagging', :as => :taggable, :dependent => :destroy has_many :tags, :class_name => 'EtiquetaRails::Tag', :through => :taggings end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
etiqueta_rails-0.0.2 | lib/etiqueta_rails/active_record.rb |