> The kind of situation I'm looking at is where I have an event
> registration form that includes address information for two different
> individuals who are part of the registration. Something like this...
>
> form_for @registration do
>
>  fields_for @registration.first_person.address do
>    text_field :street_address
>  end
>
>  fields_for @registration.second_person.address do
>    text_field :street_address
>  end
>
> end
>
> So from this I get two sets of POST parameters 'address
> [street_address]' , and the second overwrites the first. Obviously not
> what I'm aiming for. I've tried a few things but haven't found
> anything yet that works.

Maybe u can try the following:

form_for @registration do

  fields_for :first_person_address do
    text_field :street_address # , :value =>
@registration.first_person.address.street_address
  end

  fields_for :second_person_address do
    text_field :street_address # , :value =>
@registration.second_person.address.street_address
  end

end

The :value is needed if :street_address is editable. U may even need
to throw in a hidden field for :id, depending on ur requirements.

:] TY

-- 
http://ngty77.blogspot.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"merb" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/merb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to