Listing purchases

<% for purchase in @purchases %> <% end %>
Date Quantity Type Title Price Customer
<%=link_to purchase.date, :action => 'filterbydate', :id => purchase.date %> <%=h purchase.quantity %> <%=link_to purchase.type, :action => 'filterbytype', :id => purchase.type %> <%=h purchase.title %> <%=h purchase.price %> <%=link_to purchase.customer.name, :action => 'filterbycust', :id => purchase.customer_id %>
<%= 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 %>