Skip to content

Instantly share code, notes, and snippets.

@xenda
Created December 3, 2009 16:09
Show Gist options
  • Save xenda/248273 to your computer and use it in GitHub Desktop.
Save xenda/248273 to your computer and use it in GitHub Desktop.
def ul_tag(collection,li_options = {},ul_options={})
list_items = collection.map{|item|
result = yield(item)
content_tag(:li,result,li_options)
}.join
content_tag(:ul,list_items,ul_options)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment