From f102e2d11bd1633579c7cfc244a38a9d8929bd06 Mon Sep 17 00:00:00 2001 From: "Ira W. Snyder" Date: Mon, 26 Nov 2007 00:16:21 -0800 Subject: [PATCH] Fix RentablePurchases, which saved the wrong customer_id Signed-off-by: Ira W. Snyder --- app/controllers/purchase_controller.rb | 2 +- app/views/purchase/list.rhtml | 2 -- db/development.sqlite3 | Bin 25600 -> 25600 bytes 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/app/controllers/purchase_controller.rb b/app/controllers/purchase_controller.rb index 0f7e22f..1c40069 100644 --- a/app/controllers/purchase_controller.rb +++ b/app/controllers/purchase_controller.rb @@ -148,7 +148,7 @@ class PurchaseController < ApplicationController # 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 diff --git a/app/views/purchase/list.rhtml b/app/views/purchase/list.rhtml index b702f7f..6887d13 100644 --- a/app/views/purchase/list.rhtml +++ b/app/views/purchase/list.rhtml @@ -3,7 +3,6 @@ - @@ -13,7 +12,6 @@ <% for purchase in @purchases %> - diff --git a/db/development.sqlite3 b/db/development.sqlite3 index f826509eea3e306114ee5515b8c8782234f9c412..332cbaf3fbf99a24fc7624f3817a64ce94f7c18d 100644 GIT binary patch delta 983 zcmaizO-$2Z7{}lDeYy=t$HvFL*nk&xLy(cRV=xd1DuNM+20tK?OT#)=*;efeWL{u5 z454;0v^B^l{WH^hfc8;)E3|Z_=2d2=^S0* z`6w5O(p#&dqUOZ3Af-l)hm=|DF;*8DCr!nnPi_446x ze~9BkeBZ%tz~5A+wVng5nl}ES?n7xqnVL<9()xX>y{`M(;w&3k_7G#NSh5d#@ZI9C z4$Rb<^eJQ5GiL38y<&ar8<0lVW|(~tV;p8+5qyB>`a91tK=$)5*OYr zS&#j0`E-vKg<)kdD`VR!AmR8*os90uXAx>w6Y?Ai%CIGj# z=(wYT$CpzndL^mIs+tlLjD`AjezJ;786ic-g^Vg>b8B=UVS-MdZW*pv&dM285olyk z&k^bAlq6>8te|8QKxp&dX_JB~qyX&pb{+RE%Anze?X2gz0dot@eXgP=d1 z$)v+*S5Z)2Zyaoc`SRax(2f^xETxu=Q}7oa+(SQQt_*Q`vyi2-4z}Hei_Qs%e`%4n zAHU&iT*O9DhOt2lM2>gZ`5y1Cq)Chikh4o>~jGI&ubUG%O?C`?j zqt>Apm%cwl;5wNNIVmDeh%`GQhi#F~mdIjV5rwWcrO7TUbcsXs)&e(Ytq0&q9mV|6gmH2r)qK?J}FA@pvdL{k;OR?alZ(; qPXyd6vN
DateQuantity Type Title Price
<%=link_to purchase.date, :action => 'filterbydate', :id => purchase.date %><%=h purchase.quantity %> <%=link_to purchase.class, :action => 'filterbytype', :id => purchase.type %> <%=h purchase.title %> <%=h purchase.price %>