Skip to content

Instantly share code, notes, and snippets.

@timcowlishaw
Created June 10, 2009 16:48
Show Gist options
  • Save timcowlishaw/127340 to your computer and use it in GitHub Desktop.
Save timcowlishaw/127340 to your computer and use it in GitHub Desktop.
def array_to_list(data, opts={})
if data.is_a?(Array)
content_tag(:ul, data.map{ |e| content_tag(:li, array_to_list(e)) }.join , opts)
else
data
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment