hcosteira

Joined

50 Experience
0 Lessons Completed
0 Questions Solved

Activity

I'm using active storage with active_storage_db gem to keep files in Postgres instead of storing them in the cloud.
I have a document which I upload - has_one_attached (i don't need to upload multiple files at the same time). Everything works good. But then if I upload a new document I want to keep the other document to keep a record of how many documents have been uploaded and If I want to, I can download them. When I open the record of the document, the uploaded document will always be the latest one.

What happens now is every time I upload a new document, if there was already a document there, this document is replaced by the new one.

Thanks for the help.