View Full Version : Complex Forms and Models, Nested Attributes

7 Jan 2011, 2:45 PM
What are the possibilities of having forms that work against nested models? Is it recommended, at this point, to keep everything flat? That seems to be the only way FormPanel and Model work. How do you handle loading a form with fields from a Model and it's belongsTo association?

The model I have on the server accepts 'nested attributes' using Rails' style parameter naming: question[detail][label] is accessed as params[:question][:detail][:label] on the server.

I'd love to see:


The current code makes me feel like I have to understand everything about Models, Proxys, FormPanels - and how to dance around all their APIs to get something to the server in a way where I don't have to rewrite the server code that was processing HTML forms.

8 Jan 2011, 7:27 AM
I just updated my fork of the auto_complete plugin to support Rails 2.3 nested attributes. Thanks to Anthony Frustagli for the code and ideas that I used as the basis for this fix.