Module: Taggable::Model::TaggableClassMethods
- Defined in:
- lib/taggable/model.rb
Instance Method Summary collapse
- #has_tags? ⇒ Boolean
- #tagged_with(somewords = []) ⇒ Object
- #tags_for_cloud_from(these, limit = 50) ⇒ Object
Instance Method Details
#has_tags? ⇒ Boolean
94 95 96 |
# File 'lib/taggable/model.rb', line 94 def true end |
#tagged_with(somewords = []) ⇒ Object
84 85 86 87 88 89 90 91 92 |
# File 'lib/taggable/model.rb', line 84 def tagged_with(somewords=[]) if somewords.is_a?(Tag) self.from_tag(somewords) elsif somewords.is_a?(Array) self.(somewords) else self.( Tag.from_list(somewords) ) end end |
#tags_for_cloud_from(these, limit = 50) ⇒ Object
98 99 100 |
# File 'lib/taggable/model.rb', line 98 def (these, limit=50) Tag.attached_to(these).most_popular(limit) # here popularity is use-count *within the group* end |