Marnen Laibow-Koser wrote:
> 
> On Dec 21, 11:42 am, Mark Reginald James <[email protected]> wrote:
>> Marnen Laibow-Koser wrote:
>>>> It can't handle more that one level below an array parameter.
>>> Are you sure?  I've seen a few examples on the Web which imply that
>>> this should work.
>> I can confirm that it's broken in Rails 2.0.2, and fixed
>> in Rails >= 2.1.0.
> 
> Then something else is going on.  I'm using Rails 2.2.2 and having
> these problems.
> 
> [...]
>> objects[][foo] works, but objects[][foo][bar] did not.
> 
> And still apparently does not.  Any other thoughts?

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.

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