El Thursday 23 April 2009 06:17:12 Wes Gamble escribió: > 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"?] >
I don't know, but there is no reference to uploaded_data in my active_scaffold copy. Do you have some helper method like uploaded_data_form_column? > 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]" Your fields should be named record[association][association_id] [uploaded_data]. For example record[medical_facility_videos][1384a73efc138191235][uploaded_data] for new videos, and record[medical_facility_videos][8][uploaded_data] for a video with id 8. -- Sergio Cambra .:: entreCables S.L. ::. Nicolás Guillén 6, locales 2 y 3. 50.018 Zaragoza T) 902 021 404 F) 976 52 98 07 E) [email protected] --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
