I have a database called "products" that has a field that uses hstore called data.
At the moment, in my index.html.haml, I'm just looping through products and displaying their data as a hash:
- @products.each do |product|
=product.data #THIS PRINTS A HASH
%hr
Which, for example, could print a hash like:
{"Name"=>"Example","type"=>"book", "price"=>"7.99"}
I'd like to make a HTML table that could hold a dynamic number of keys and values, and print them into columns with values corresponding to keys. Here's a diagram:

Thanks for all help!