You need to tell the relationship that the photo's are dependent on the car. So...
has_many :photos, :dependent => :destroy
Now, when you destroy the car, all it's photos go with it. See the API for more info...
pablo wrote:
You need to tell the relationship that the photo's are dependent on the car. So...
has_many :photos, :dependent => :destroy
Now, when you destroy the car, all it's photos go with it. See the API for more info...
pablo wrote: