So I am now able to set/upload an image to my app using file_column,
with a little bit of a change to the code.
I can change the image using an Edit page, but I’m trying to figure out
what to do if the user wants to remove the image. I tried adding a
Remove Image link in my list, but I’m not sure what to do in the
remove_image method in my controller. I tried setting the ‘image’ value
to ‘’; I tried using update_attribute to set to ‘’ and neither did
anything. The SQL update command that was logged just showed it
replacing the records values with the same data - ie. not changing
anything.
I tried doing an update_attribute to “”, but I got an error from
file_column:
(Do not know how to handle a string with value ‘nothing’ that was passed
to a file_column. Check if the form’s encoding has been set to
‘multipart/form-data’.)
Yeah, newbie…
(And I haven’t even added a second relationship table to my app
yet…figured this would be the easy part.)
Thanks.
jt