#556 ✓resolved
Leon Bogaert

destroy! fails (has :n, :through => resource)

Reported by Leon Bogaert | September 8th, 2008 @ 03:47 PM

I've created two models with an many-to-many association between them. Using destroy! on a collection fails with a sql-query.

The ruby code can be found here: http://pastie.org/268371

The error is: table images has no column named car_id (Sqlite3Error) The @text attribute from command contains: DELETE FROM "images" WHERE "cars_images"."car_id" IS ? AND "images"."id" IN ?

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket


Referenced by