fixed problem with multiple carts and a whole load of problems with crazy delivery destination logic / if I didn't write it i would have thought it was written by a drug abuser during high
This commit is contained in:
@@ -2,5 +2,6 @@ class Cart < ActiveRecord::Base
|
||||
|
||||
has_many :item_in_carts
|
||||
belongs_to :user
|
||||
belongs_to :delivery_destination
|
||||
|
||||
end
|
||||
|
||||
@@ -6,7 +6,7 @@ class ItemInCart < ActiveRecord::Base
|
||||
validates :item_id, presence: true
|
||||
validates :cart_id, presence: true
|
||||
|
||||
def to_s
|
||||
def name
|
||||
item.name + " " + count.to_s + " " + price.to_s
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user