Module: ActsAsTaggableOn::Taggable::Cache::ClassMethods
- Defined in:
- lib/acts_as_taggable_on/taggable/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
65 66 67 68 |
# File 'lib/acts_as_taggable_on/taggable/cache.rb', line 65 def acts_as_taggable_on(*args) super(*args) end |
#caching_tag_list_on?(context) ⇒ Boolean
70 71 72 |
# File 'lib/acts_as_taggable_on/taggable/cache.rb', line 70 def caching_tag_list_on?(context) column_names.include?("cached_#{context.to_s.singularize}_list") end |
#initialize_tags_cache ⇒ Object
55 56 57 58 59 60 61 62 63 |
# File 'lib/acts_as_taggable_on/taggable/cache.rb', line 55 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 |