Re: Help with nested models and fields_for

Marnen Laibow-Koser
Sat, 20 Dec 2008 16:15:04 -0000

On Dec 20, 8:22 am, Mark Reginald James
<m...-bzGI/hKkdgQnC9Muvcwxkw@public.gmane.org>
wrote:
> I believe this is a limitation of Rails'' parameter parsing.

I was afraid of that.  This may be the excuse I need to start hacking
the core. :)

> 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.

By "array parameter", do you specifically mean one with a numeric
subscript, so that object[foo][bar][baz] would work as expected,
although objects[][foo][bar][baz] would not?  If so, that would
explain some -- not all -- of the examples I''ve seen.

>
> A solution is to create an ingredient_name accessor in
> IngredientLine, and arrange to have this rendered and posted.

Yeah, but that''s so *ugly*...