Forum: Ruby on Rails RE: HABTM - what am I doing wrong?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
60e38de043848f82392062088f191213?d=identicon&s=25 HOGANBP (Guest)
on 2005-11-12 12:49
(Received via mailing list)
Try dumping your model for items_subjects and recreate the migrations?

I'm not doing anything with those yet so I won't be much help, sorry. I
thought that a migration was created from your database tables... Not
sure how it works quite yet.
36df5a25b0f7e1a39826370b91497167?d=identicon&s=25 charlesleeds (Guest)
on 2005-11-12 12:49
(Received via mailing list)
Yeah, did just that and found the answer is to set an ":id => false"
into the create_table statement.  It also set a :force => true, but I'm
not quite sure what that does yet.

    create_table "items_subjects", :id => false do |t|
631950bd299098576e57053ce703e082?d=identicon&s=25 nshb (Guest)
on 2005-11-12 12:49
(Received via mailing list)
The :force => true drops the table before the create table is done to
ensures that the table can be created, consequently, by force.

- Nathan
This topic is locked and can not be replied to.