Module: MakeTaggable::Taggable::Cache
- Defined in:
- lib/make_taggable/taggable/cache.rb
Overview
Keeps a rendered copy of a tag list in a column on the taggable itself, so a list can be shown without loading its tags.
Caching switches itself on for any context the model has a matching cached_<context>_list
column for. Nothing else is required.
Defined Under Namespace
Modules: ClassMethods, Columns, InstanceMethods
Class Method Summary collapse
- .included(base) ⇒ void private
Class Method Details
.included(base) ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This method returns an undefined value.
21 22 23 24 25 |
# File 'lib/make_taggable/taggable/cache.rb', line 21 def self.included(base) # When included, conditionally adds tag caching methods when the model # has any "cached_#{tag_type}_list" column base.extend Columns end |