0
parent table = cars
related table = parts

c = car.find_by_id(1)
c.part.new(:car_id => 1, :part_name =>  "gas pedal", :color => "black")

I can't get this to work.

How can I do this? How do I find what methods I can use for this relationship?

4

1 に答える 1