Guest User

Untitled

a guest
Mar 13th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. def tag_cloud(tags)
  2. list(tags.map(&:tag)) { |tag| link_to(tag.title, whatever_path(tag)) }
  3. end
  4.  
  5. def list(elements)
  6. content_tag(:ul, elements.map {|e| content_tag(:li, yield e)})
  7. end
Add Comment
Please, Sign In to add comment