All plugins which allow you to set up form fields (
data_uri, ...) work in a way that they add getters and setters to your models, so you could use
photo.remove_image = true.
However, for removing attachments in Ruby code you don't need the
remove_attachment plugin, you can just assign the attachment to
photo.image = nil # or photo.update(image: nil)