I am using Paperclip (w/ Amazon s3) on Rails 3. I want to delete an existing attachment without replacing it using an update action.
I've only found one example of this here and could not get that to work, it just wouldn't delete and there was nothing in the logs to say why. I wanted to do something like this on the form:
<%- unless @page.new_record? || [email protected]? -%>
<%= f.check_box :image_delete, :label => 'Delete Image' %>
<%- end -%>
(page is the name of the model, image is the attribute name which holds the attachment)
But how do I detect that checkbox and more importantly, how do I delete the image? I appreciate any help!