On Viernes, 23 de Abril de 2010 20:49:05 Russell escribió: > As per my prior post, I have been trying to use attachment_fu with > activescaffold. After many hours of debugging, I discovered that the > input_Data wasn't being passed back with the correct field name. In > the helper, per the documentation, I had: > > def uploaded_data_form_column(record, input_name) > file_field_tag input_name > end > > However, file_field_tag requires the first parm to be the name of the > object. the input_name is a has, which was converting into a very > complex field name, so it wasn't matching. I modified the code to: > > def uploaded_data_form_column(record, input_name) > file_field_tag "record['uploaded_data']", input_name > end
If you are using active_scaffold master second argument is not input_name, it's options hash. You can use: def uploaded_data_form_column(record, options) file_field_tag options[:name], options end -- Sergio Cambra .:: entreCables S.L. ::. Mariana Pineda 23, 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.
