Hi I have 3 models: user, seller and cars
i want the user to be able to choose a car from a seller and this gets added to the user's shopping list.
I have something like this in my car controller:
@user = User.find(params[:user])
@seller = Seller.find(params[:seller])
@car = @user.cars.build(params[:car])
but the seller isnt being added. how can I do this please?
Btw I have this:
class Car < ActiveRecord::Base
belongs_to :user
belongs_to :seller
end
in my Model for car