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

Lists in Python -

android - can not access to progress bar in an other activity -

java - Vaadin 7 Pass Data Between Views -