Using helpers in rails 3 to output html
I'm trying my best to build a helper that outputs a <'ul> consisting of all the members of a collection. For each member of the collection I want to print out a <'li> that has a title, and a div of links to CRUD the member. This is pretty similar to what Rails outputs for scaffolding for the index view. Here is the helper I've got: def display_all(collection_sym) collection = collection_sym.to_s.capitalize.singularize.constantize.all name = collection_sym.to_s.downcase html = '' html << "<ul class=\"#{name}-list\">" for member in collection do html << content_tag(:li, :id => member.title.gsub(