Need help iterating over attributes of a Active record object

Hi all...

I need help with a little ruby code. I am trying to output every attribute of an actice record object something like:

<% for product in @products %>     <% for each product.attribute |attribute| %>        <p> </p>     <% end %> <% end %>

product.attributes return a Hash object, so you want:

<ul> <% product.attributes.each_pair do |k,v| %>   <li><%= k %> => <%= v %></li> <% end %> </ul>

Thanks alot mate...