Gets an array of tag names and post counts for tags with names that begin with the specified query string.
# File lib/thoth/model/tag.rb, line 48 def self.suggest(query, limit = 1000) tags = [] self.dataset.grep(:name, "#{query}%").all do |tag| tags << [tag.name, tag.posts.count] end tags.sort!{|a, b| b[1] <=> a[1]} tags[0, limit] end
Gets the Atom feed URL for this tag.
# File lib/thoth/model/tag.rb, line 64 def atom_url Config.site.url.chomp('/') + R(TagController, :atom, CGI.escape(name)) end
Generated with the Darkfish Rdoc Generator 2.