attachinary
attachinary copied to clipboard
How do I give user an option to remove image?
I am not sure how would I give an option to remove the image and I am unable to find it. Can someone help me out please?
You can set the attribute to nil or just delete the associated Attachinary::File object.
https://github.com/assembler/attachinary/blob/master/lib/attachinary/orm/active_record/extension.rb#L22
Right. But how do I give user the option in UI? Putting a button, which when clicked upon hides the image and set the field empty through javascript?
User needs to click "Save" after removing the image from the form for the changes to take effect.