Created_on in HABTM table getting parent dates

All of my HABTM tables receive the parent created_on/last_update_on
dates whenever a record is inserted into these join tables. I don’t
have any defaults in the database or anything else populating these
tables. I assumed rails would populate these automagically. Is there
something that needs to be done to get this to populate with the correct
current timestamp instead of inheritating from parent? Any help is
greatly appreciated.

ds

Dave Sl wrote:

All of my HABTM tables receive the parent created_on/last_update_on
dates whenever a record is inserted into these join tables. I don’t
have any defaults in the database or anything else populating these
tables. I assumed rails would populate these automagically. Is there
something that needs to be done to get this to populate with the correct
current timestamp instead of inheritating from parent? Any help is
greatly appreciated.

If you’re using habtm, all you should have in the table is the foreign
keys of the two tables being joined. If you need anything more than
that, use a join model (has_many :through) instead.

http://blog.hasmanythrough.com/articles/2006/04/20/many-to-many-dance-off


Josh S.
http://blog.hasmanythrough.com