Module: ActsAsTaggableOn::Taggable::Cache::ClassMethods
- Defined in:
- lib/acts_as_taggable_on/acts_as_taggable_on/cache.rb
Instance Method Summary collapse
- #acts_as_taggable_on(*args) ⇒ Object
- #caching_tag_list_on?(context) ⇒ Boolean
- #initialize_tags_cache ⇒ Object
Instance Method Details
#acts_as_taggable_on(*args) ⇒ Object
58 59 60 61 |
# File 'lib/acts_as_taggable_on/acts_as_taggable_on/cache.rb', line 58 def acts_as_taggable_on(*args) super(*args) end |
#caching_tag_list_on?(context) ⇒ Boolean
63 64 65 |
# File 'lib/acts_as_taggable_on/acts_as_taggable_on/cache.rb', line 63 def caching_tag_list_on?(context) column_names.include?("cached_#{context.to_s.singularize}_list") end |
#initialize_tags_cache ⇒ Object
48 49 50 51 52 53 54 55 56 |
# File 'lib/acts_as_taggable_on/acts_as_taggable_on/cache.rb', line 48 def tag_types.map(&:to_s).each do |tag_type| class_eval <<-RUBY, __FILE__, __LINE__ + 1 def self.caching_#{tag_type.singularize}_list? caching_tag_list_on?("#{tag_type}") end RUBY end end |