Module: ActsAsTaggableOnDynamic::Utils::InstanceMethods
- Defined in:
- lib/acts_as_taggable_on_dynamic/utils.rb
Instance Method Summary collapse
-
#tag_context_list ⇒ Object
Return an array of context names which are valid for the given model type.
Instance Method Details
#tag_context_list ⇒ Object
Return an array of context names which are valid for the given model type
Example:
self.tag_context_list => ['tags']
16 17 18 |
# 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 |