Hello,

Do you think it could make sense to add an option to `has_one_attached`, so 
that any previous attachment is automatically purged (or purged later) when 
calling `attach`?

The syntax could be:

```
has_one_attached :attachment, previous_attachment: { :purge | :purge_later 
| :restrict_with_error | :restrict_with_exception }
```

This follows the question posted here: 
https://stackoverflow.com/questions/45870021/how-to-update-attachment-in-activestorage-rails-5-2/45933694#45933694

What do you think?

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-core+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-core@googlegroups.com.
Visit this group at https://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.

Reply via email to