Forum: Ruby on Rails Many-To-Many relation - Creating all models in the same form

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
1e08d48f2c4011e254f34dfb457811df?d=identicon&s=25 Felipe Lopes (Guest)
on 2009-04-11 23:24
(Received via mailing list)
Hello,

I want to create a screen similar to the delicious one, where you can
assign tags dynamically

to the bookmarks, but I don't have the tags neither the bookmark
created before the submit, and

all approaches that i tried resulted in the following error:

 "Cannot associate new records through 'Bookmark#taggings' on '#'.
Both records must have an id in order to create the has_many :through
record associating them."

Any body have an example or any insights about that?

I think my approach will be use a plugin for taggables models, but I
want to understand how to do

this in case I have another kind of many-to-many.

Regards, Felipe Lopes
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2009-04-11 23:28
(Received via mailing list)
On Apr 11, 10:10 pm, Felipe Lopes <felipelope...@gmail.com> wrote:
>
> all approaches that i tried resulted in the following error:
>
>  "Cannot associate new records through 'Bookmark#taggings' on '#'.
> Both records must have an id in order to create the has_many :through
> record associating them."
>
> Any body have an example or any insights about that?
>
It was limitation of has many through until rails 2.1

Fred
1e08d48f2c4011e254f34dfb457811df?d=identicon&s=25 Felipe Lopes (Guest)
on 2009-04-12 04:56
(Received via mailing list)
should be update rails my approach?

should it start working after an update?
This topic is locked and can not be replied to.