Signed-off-by: Ira W. Snyder <devel@irasnyder.com>
# Actually record the purchase
purchase = RentablePurchase.new
- purchase.customer_id = session[:customer_id]
+ purchase.customer_id = session[:customer_id][0]
purchase.date = Time.now.to_date
purchase.price = @rentable.calculated_price
purchase.rentable = @rentable
<table border="1">
<tr>
<th>Date</th>
- <th>Quantity</th>
<th>Type</th>
<th>Title</th>
<th>Price</th>
<% for purchase in @purchases %>
<tr>
<td><%=link_to purchase.date, :action => 'filterbydate', :id => purchase.date %></td>
- <td><%=h purchase.quantity %></td>
<td><%=link_to purchase.class, :action => 'filterbytype', :id => purchase.type %></td>
<td><%=h purchase.title %></td>
<td><%=h purchase.price %></td>