Module: ActsAsTaggableOnMongoid::Taggable::ListTags

Extended by:
ActiveSupport::Concern
Defined in:
lib/acts_as_taggable_on_mongoid/taggable/list_tags.rb

Overview

This module adds methods for tracking tag definitions within Taggable classes

Instance Method Summary collapse

Instance Method Details

#tag_definition(tag_type) ⇒ Object



23
24
25
26
27
# File 'lib/acts_as_taggable_on_mongoid/taggable/list_tags.rb', line 23

def tag_definition(tag_type)
  return unless tag_type.present?

  tag_types[tag_type] ||= ActsAsTaggableOnMongoid::Taggable::TagTypeDefinition.new(self, tag_type)
end

#tag_typesObject



15
16
17
18
19
20
21
# File 'lib/acts_as_taggable_on_mongoid/taggable/list_tags.rb', line 15

def tag_types
  klass = self.class

  self.my_tag_types = klass.cleanup_tag_types(my_tag_types, klass)

  my_tag_types
end