[ActiveStorage] Any plans for file versioning?

48 views
Skip to first unread message

Whyves

unread,
Apr 30, 2019, 7:33:19 PM4/30/19
to Ruby on Rails: Core
Hi guys,

We need to implement versioning in our product and unfortunately this is not yet supported by ActiveStorage. Do any of you know if someone is working on it ... or maybe another gem that does that? I searched but didn't find anything. If something is in progress we could possibly contribute.

Thanks!


Colin Ross

unread,
Oct 10, 2019, 7:56:34 PM10/10/19
to Ruby on Rails: Core
For the sake of explanation; Given a Document is a collection of data that may be updated over time with each change being persisted as a File.
In the context of ActiveStorage, an attachment is an abstraction/proxy for a File, not a Document.

In other words, if you want to support multiple versions, use a `has_many :files` with a helper that points to the `current` if you need to maintain a history of the previous versions.
Reply all
Reply to author
Forward
0 new messages