I am having this same problem, but I need to do this with ajax.....
any ideas?  I've been racking my brain on this for a few hours now and
am losing it,

On Sep 22, 6:47 am, jney <[EMAIL PROTECTED]> wrote:
> Hi erol,
>
> Try this :
>
> <% form_for(@master_model) do |f| %>
>   <%= f.error_messages %>
>
>   <%-fields_for('master_model[sub_model][]', SubModel.new) do |sm| -
> %>
>     <%= sm.text_field :field1 %>
>     <%= sm.text_field :field2 %>
>     <%= sm.text_field :field3 %>
>   <%- end -%>
>
>   <%-fields_for('master_model[sub_model][]', SubModel.new) do |sm| -
> %>
>     <%= sm.text_field :field1 %>
>     <%= sm.text_field :field2 %>
>     <%= sm.text_field :field3 %>
>   <%- end -%>
>   <p>
>     <%= f.submit "Create" %>
>   </p>
> <% end %>
>
> then check params format (it should be ok), then replace "form_for"
> with "remote_form_for" and check params format,
> "master_model[sub_model]" should be wrong
>
> On 22 sep, 01:29, Erol Fornoles <[EMAIL PROTECTED]> wrote:
>
> > On Sep 22, 1:29 am, jney <[EMAIL PROTECTED]> wrote:
>
> > > i just checked it again and it looks like a form_remote_for bug,
> > > because with a non ajax form_for params are well formed,
> > > can someone confirm it?
>
> > It's impossible to confirm with the little information you've given.
> > Care to elaborate?
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to