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.
On Wed, May 5, 2010 at 12:32 AM, keith <keith.tom@gmail.com> wrote:
> 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
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Core" group.
> To post to this group, send email to rubyonrails-core@googlegroups.com.
> To unsubscribe from this group, send email to
>
rubyonrails-core+unsubscribe@googlegroups.com<rubyonrails-core%2Bunsubscribe@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-core?hl=en.
>
>
--
Joe Ellis
squarefour | http://www.squarefour.net
504.383.4774
joe@squarefour.net
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Core" group.
To post to this group, send email to rubyonrails-core@googlegroups.com.
To unsubscribe from this group, send email to
rubyonrails-core+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-core?hl=en.