Module: ActsAsTaggableOnMongoid::Models::Concerns::TagHooks
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/acts_as_taggable_on_mongoid/models/concerns/tag_hooks.rb
Overview
Update and Destroy hooks for tags to update denormalized data.
NOTE: If the tag is cached AND owned, assumptions are made about the
relationship of a Tag to the Taggings and the taggable_type.
Specifically, the taggable_type is assumed to have an ID field that
matches the owner. This field can be specified in the tag_definition
as owner_id_field.
If there isn't a simple relationship like this then override the following
methods to update the cached data properly:
* remove_cached_taggings
* update_cached_taggings