module ActsAsTaggableOn::Taggable::Cache::ClassMethods

Public Instance Methods

acts_as_taggable_on(*args) click to toggle source
Calls superclass method
# File lib/acts_as_taggable_on/taggable/cache.rb, line 61
def acts_as_taggable_on(*args)
  super(*args)
  initialize_tags_cache
end
caching_tag_list_on?(context) click to toggle source
# File lib/acts_as_taggable_on/taggable/cache.rb, line 66
def caching_tag_list_on?(context)
  column_names.include?("cached_#{context.to_s.singularize}_list")
end
initialize_tags_cache() click to toggle source
# File lib/acts_as_taggable_on/taggable/cache.rb, line 51
      def initialize_tags_cache
        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