Module: Tagger::ActiveRecord::ClassMethods
- Defined in:
- lib/tagger/active_record.rb
Instance Method Summary collapse
Instance Method Details
#taggable(options = {}) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/tagger/active_record.rb', line 12 def taggable(={}) include InstanceMethods self. = { :separator => [:separator], :scope => [:scope] } has_many :taggings, :as => :taggable, :dependent => :destroy has_many :tags, :through => :taggings, :order => "tags.name asc" after_save :save_tags end |