Module: TintedTags::ViewHelpers

Defined in:
lib/view_helpers/view_helpers.rb

Instance Method Summary collapse

Instance Method Details

#tinted_tag_cloud(tags) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/view_helpers/view_helpers.rb', line 3

def tinted_tag_cloud tags
  (:ul, nil, class: "tinted-tag-cloud") do
    tags.map do |tag|
      concat((:li, tag.name, style: ("background-color: #{tag.tint}")))
    end
  end
end