Felipe Lopes
2009-Apr-11 21:10 UTC
Many-To-Many relation - Creating all models in the same form
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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Frederick Cheung
2009-Apr-11 21:27 UTC
Re: Many-To-Many relation - Creating all models in the same form
On Apr 11, 10:10 pm, Felipe Lopes <felipelope...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Felipe Lopes
2009-Apr-12 02:55 UTC
Re: Many-To-Many relation - Creating all models in the same form
should be update rails my approach? should it start working after an update? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---