Thanks for the explanation Sergio.

Ok, so I can't have one select form without some customization or pre-
processing the form input.

After giving it some thought I think I'll have two select boxes. One
chooses the _type, and then the second one the _id.
I'm trying to get it to work with update_column.

So that once a _type is selected, appropriate records get loaded only
for that type. Chaining fields essentially.

I've created one helper sponsorship_type_form_column which builds the
select box for type. But this

config.columns[:sponsorship_type].options = {:update_column
=> :sponsorship_id}

Does not generate any AJAX requests when something is selected
(checking via Firebug).



> AS supports polymorphic associations for example in constraints (for nested
> scaffolds). It doesn't support them in forms, they are excluded by default.
> There is two issues with polymorphic associations:
> - AS doesn't know from what classes include in select tag
> - One form element is used to fill two attributes (_type and _id attributes)

> You can build your own override for the column to shown Organization and
> Individual records mixed in a select, but value cannot be the id because you
> won't guess if that id is for an organization or individual. You will have to
> build a value joining the class name and the id, and in controller fill the
> association, loading the object in a before_filter or overriding do_create and
> do_update.

-- 
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" 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/activescaffold?hl=en.

Reply via email to