Listing purchases

<% for purchase in @purchases %> <% end %>
Date Type Title Price Customer
<%=link_to purchase.date, :action => 'filterbydate', :id => purchase.date %> <%=link_to purchase.class, :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 %>