On Dec 22, 1:22 am, Mark Reginald James <[email protected]> wrote:
> The test I did was to post from the following view.
>
> <form>
> <input name="recipe[ingredient_lines][][ingredient][name]" type="text"/>
> </form>
>
> On Rails >= 2.1 I got the correct
> "recipe"=>{"ingredient_lines"=>[{"ingredient"=>{"name"=>"hhh"}}]}
>
> on 2.0.2 I got what you're seeing:
> "recipe"=>{"ingredient_lines"=>[{"ingredient"=>{}}]}
>
> You may like to run the same test.

Thanks for the suggestion.  I tried the same test, and got interesting
if disheartening results.  When I had recipe[ingredient_lines][]
[ingredient][name] as the only form field, I got the same results as
you.  But the moment I added recipe[ingredient_lines][][unit],
[ingredient][name] stopped working.  This was true both with Rails
2.1.2 and 2.2.2.  I think I may be running into a bug in Rails.

Best,
--
Marnen Laibow-Koser
[email protected]
http://www.marnen.org
>
> If you see the same, perhaps the problem manifests when extra
> parameters are added. You can try adding fields until you
> are posting your complete form.  Please post what you find out.
>
> --
> Rails Wheels - Find Plugins, List & Sell Plugins -http://railswheels.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 [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