Greetings,
I have a Client model with a has_many relationship to an Email model.
On my user form I am allowing the user to associate multiple email
addresses to a client and assign one of them as the primary address.
I have created a partial called _email that I am rendering as a
collection from an @emails array.
My issues:
1) I cannot get the :index parameter to work with the text_field in the
partial when rendering a collection of the _email partial. Relevant
code.
<%= text_field :email, :address, :index => :email, :size => 25 -%>
The parameters list shows up as
"email"=>[{"address"=>"address1-YDxpq3io04c@public.gmane.org"},
{"address"=>"address2-YDxpq3io04c@public.gmane.org"}]}
2) When a new client is first created, there are no email addresses
associated with it, but i would like to render my partial with index 1
and then subsequent partials added afterwards via link_to_remote will
continue that index numbering (2,3,4,etc). This may not work because
of #1, but I thought I''d throw it out there all the same.
Help is greatly appreciated.
Thanks!
-
Justin Williams
http://carpeaqua.com/
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---