Module: MuckServices::Models::MuckTagCloud::ClassMethods

Defined in:
lib/muck-services/models/tag_cloud.rb

Instance Method Summary collapse

Instance Method Details

#language_tags(language_id = 38, grain_size = 'all', filter = '') ⇒ Object

Get a tag cloud for the given language HACK language_id = 38 is english



12
13
14
15
# File 'lib/muck-services/models/tag_cloud.rb', line 12

def language_tags(language_id = 38, grain_size = 'all', filter = '')
  cloud = TagCloud.find(:first, :conditions => ["language_id = ? AND grain_size = ? AND filter = ? ", language_id, grain_size, filter.sort.join('/')])
  cloud.nil? ? '' : cloud.tag_list
end