module ActsAsTaggableOnDynamic::Utils::InstanceMethods

Public Instance Methods

tag_context_list() click to toggle source

Return an array of context names which are valid for the given model type

Example:

self.tag_context_list => ['tags']
# File lib/acts_as_taggable_on_dynamic/utils.rb, line 16
def tag_context_list
  ActsAsTaggableOn::Tagging.where("taggable_type = '#{self.class.name}'").select(:context).uniq.map(&:context)
end