I have this line of code:
<%= link_to "Add to cart", :controller => "car", :action => "add_to_cart", :car => car %>
when im in the add_to_cart method...how can i call the :car please?
@car = Car.new(params[:car])
That doesn't work because it says that I'm trying to stringify it.
I don't understand what's wrong; because I used this to create new users and it worked fine.
By the way, car is my car object.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…