projects
/
cs356-p2-videostore.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix RentablePurchases, which saved the wrong customer_id
[cs356-p2-videostore.git]
/
app
/
controllers
/
purchase_controller.rb
diff --git
a/app/controllers/purchase_controller.rb
b/app/controllers/purchase_controller.rb
index
0f7e22f
..
1c40069
100644
(file)
--- 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
# 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
purchase.date = Time.now.to_date
purchase.price = @rentable.calculated_price
purchase.rentable = @rentable