Sha256: e7cfc422d57cd0424a3acb5bf3172299913a6de8ef11732f69b92cef8693c031
Contents?: true
Size: 394 Bytes
Versions: 4
Compression:
Stored size: 394 Bytes
Contents
# Helper for displaying tag clouds (not used in CaP). # origin: RM module TagsHelper def render_tags(tags) tags = tags.collect do |tag| tag.respond_to?(:name) ? tag.name : tag end content_tag :div, :class => 'tags' do tags.sort_by { |t| t.downcase }.collect do |tag| content_tag :span, h(tag), :class => 'tag' end.join(' ').html_safe end end end
Version data entries
4 entries across 4 versions & 1 rubygems