module YeshuaCrm::ActsAsTaggable::Taggable::InstanceMethods
Public Instance Methods
save_cached_tag_list()
click to toggle source
# File lib/yeshua_crm/acts_as_taggable/rcrm_acts_as_taggable.rb, line 296 def save_cached_tag_list if self.class.caching_tag_list? self[self.class.cached_tag_list_column_name] = tag_list.to_s end end
tag_counts(options = {})
click to toggle source
Calculate the tag counts for the tags used by this model.
The possible options are the same as the tag_counts
class method.
# File lib/yeshua_crm/acts_as_taggable/rcrm_acts_as_taggable.rb, line 329 def tag_counts(options = {}) return [] if tag_list.blank? options[:conditions] = self.class.send(:merge_conditions, options[:conditions], self.class.send(:tags_condition, tag_list)) self.class.tag_counts(options) end
tag_list()
click to toggle source
# File lib/yeshua_crm/acts_as_taggable/rcrm_acts_as_taggable.rb, line 282 def tag_list return @tag_list if @tag_list ||= nil if self.class.caching_tag_list? && !(cached_value = send(self.class.cached_tag_list_column_name)).nil? @tag_list = TagList.from(cached_value) else @tag_list = TagList.new(*tags.map(&:name)) end end
tag_list=(value)
click to toggle source
# File lib/yeshua_crm/acts_as_taggable/rcrm_acts_as_taggable.rb, line 292 def tag_list=(value) @tag_list = TagList.from(value) end