Module: DataMapper::Is::Tagger::ClassMethods

Defined in:
lib/dm-is-taggable/is/tagger.rb

Instance Method Summary collapse

Instance Method Details

#add_taggable_object_classes(taggable_object_classes) ⇒ Object



40
41
42
43
44
45
46
# File 'lib/dm-is-taggable/is/tagger.rb', line 40

def add_taggable_object_classes(taggable_object_classes)
  taggable_object_classes.each do |taggable_object_class|
    self.taggable_object_classes << taggable_object_class
    self.has n, "#{taggable_object_class.storage_name.singular}_tags".intern
    self.has n, taggable_object_class.storage_name.intern, :through => "#{taggable_object_class.storage_name.singular}_tags".intern
  end
end

#tagger?Boolean

Returns:

  • (Boolean)


36
37
38
# File 'lib/dm-is-taggable/is/tagger.rb', line 36

def tagger?
  true
end