Hi,
I’m trying to set up file_column to upload attachments for emails. My
view has
<%= file_column_field ‘to_do’, ‘attachment’
%> | and the attachment_temp hidden field is generated. When I
inspect tthe params on saving the form the attachment_temp param is
always an empty string. Also, when I was setting this up I got a no
method error attachment_temp on save and had to (temporarily I hope) add
that field to the table. The to_do model has ‘file_column :attachment’
On save, the attachment field is updated with the correct file name but
no upload takes place. I’m just not seeing why the _temp field is not
gwtting a value. Any clues?
TIA,
Eric.
your form properbly misses multipart encoding ala
Hi Brian,
Thanks for the response. I have
<%= start_form_tag :controller => ‘to_dos’, :action => ‘add_to_dos’, :id
=> @job, :multipart => true %>
in my view which is generating
- but
I still get an error re: Check if the form's encoding has been set to
'multipart/form-data'. Can you see anything wrong here?
Cheers,
Eric.
Hi,
Have solved my own dumb problem - I shoulda been putting braces around
my url_for_options and options when I added the multipart statement.
Sorry to be a nuisance
Cheers,
Eric.