Never mind. I looked at Ryan Bates complex forms example for the
100th time and got it to work using his method. SWEET.
On Feb 23, 12:34 am, Me <chabg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> I have 2 models:
>
> mop, has_and_belong_to_many :contacts
> contact, has_and_belong_to_many :mops
>
> when I save my mop Ii have the users coming in a an array:
> ["9",10"]
>
> I am doing this to asscociate each one to a mop:
>
> @contacts.each do |contact|
> @mop.contacts << contact
> end
>
> Contact(#44950470) expected, got String(#20837400)
>
> It is giving me the above error. Any ideas?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---