ruby on rails - Shrine gem - how to delete uploaded images from s3 -


apparently :remove_attachment plugin trick checking , submitting how can call method controller?

all plugins allow set form fields (remove_attachment, remote_url, data_uri, ...) work in way add getters , setters models, if have photo model "image" attachment, can photo.remove_image = true.

however, removing attachments in ruby code don't need remove_attachment plugin, can assign attachment nil:

photo.image = nil # or photo.update(image: nil) 

Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -