Module: IsTaggable::ActiveRecordExtension

Defined in:
lib/is_taggable.rb

Instance Method Summary collapse

Instance Method Details

#is_taggable(*kinds) ⇒ Object



22
23
24
25
26
27
28
# File 'lib/is_taggable.rb', line 22

def is_taggable(*kinds)
  class_inheritable_accessor :tag_kinds
  self.tag_kinds = kinds.map(&:to_s).map(&:singularize)
  self.tag_kinds << :tag if kinds.empty?

  include IsTaggable::TaggableMethods
end