All,

I have two models:

  MedicalFacility
  MedicalFacilityVideo (which happens to be an attachment_fu model)

MedicalFacility has_many MedicalFacilityVideos.

MedicalFacilitiesController AS config:

  config.columns includes :medical_facility_videos

MedicalFacilityVideosController AS config:

  config.create.columns = [:uploaded_data]

When I render the Create for a new MedicalFacility, I get the (default) 
CRUD subform for MedicalFacilityVideos with one (file) field:

[Aside: I don't understand how AS even knows to do a file_field for this 
field - is it because it's named "uploaded_data"?]

and a button named "Create Another".

The first file field name is "record[uploaded_data]".

When I click the "Create Another" button, I get another file field, but 
with the same name, "record[uploaded_data]"

Question: Is this subform supposed to generate multiple fields with the 
same name under normal circumstances?  Why aren't the names of the form 
"record[uploaded_data][]" so that I end up with an array when the 
parameters are submitted?

Thanks,
Wes





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