Forum: Ruby on Rails AR many-many join tables - can they have created_on, updated

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.
Peter F. (Guest)
on 2006-05-25 01:38
(Received via mailing list)
Hello all,

I'm creating a many-many join table between 'homes' and 'users'.  Can it
contain created_on?  will AR update created_on, updated_on on this

CREATE homes_users (
home_id int not null,
user_id int not null,
created_on datetime null,
updated_on datetime null

Thanks for your advice!
unknown (Guest)
on 2006-05-25 03:13
(Received via mailing list)
I don't think so. It's the table's associated class/object that does
it and a habtm table doesn't have a class. Use a has_many :through.
That'll do it.
This topic is locked and can not be replied to.