Listing purchases

<% for column in Purchase.content_columns %> <% end %> <% for purchase in @purchases %> <% for column in Purchase.content_columns %> <% end %> <% end %>
<%= column.human_name %>
<%=h purchase.send(column.name) %><%= link_to 'Show', :action => 'show', :id => purchase %> <%= link_to 'Edit', :action => 'edit', :id => purchase %> <%= link_to 'Destroy', { :action => 'destroy', :id => purchase }, :confirm => 'Are you sure?', :method => :post %>
<%= link_to 'Previous page', { :page => @purchase_pages.current.previous } if @purchase_pages.current.previous %> <%= link_to 'Next page', { :page => @purchase_pages.current.next } if @purchase_pages.current.next %>
<%= link_to 'New purchase', :action => 'new' %>