Rails 3 beta 3 HABTM buggy?

Hi,

I just recently tried using a HABTM association (rails 3 beta 3) and noticed two possible bugs. When doing the following (with a HABTM association),

record = model.collection.build record.save

the model and associated model are created in the db, but there is no row inserted in the related join table.

Also, if I do:

record = model.collection.create

a row will be inserted into join table however, I noticed the SQL for created_at and updated_at time stamps look strange in the logs:

INSERT INTO `filers_issuers` (`created_at`, `filer_id`, `issuer_id`, `updated_at`) VALUES ('\'2010-05-05 04:14:15\'', 1, 3, '\'2010-05-05 04:14:15\'')

It seems there is some kinda of escaping going wrong.

Is this an issue that someone is aware of?

Thanks, Keith

Had a similar problem and after some searching, found this ticket in Lighthouse: https://rails.lighthouseapp.com/projects/8994/tickets/4329-has_many-through-association-does-not-link-models-on-association-save . I think it’s related to the same issue.

I don’t think anyone’s on it yet, but the above ticket may give someone on the list more information about the issue to address fixing it, so I thought I’d bring it up.