markstewie
markstewie

Reputation: 9587

Version control of text fields in rails application

I'm planning a new app that will handle multiple text fields on many projects for many users. ie, there will be a lot of text fields to manage.

A key feature will be the ability to "roll back" to view and update to previous versions of each and every text field.

Can anyone give me some advice on how best to handle this?

It seems like there would be a huge amount of data if each and every version of each and every potential text field was stored in the same table. But it may be the only way, and there is nothing wrong with storing each and every version in it's entirety?

I thought there might be a smart approach to this though?

Upvotes: 0

Views: 306

Answers (1)

Tobi
Tobi

Reputation: 346

I would suggest using a versioning library like paper_trail. It will log all the changes to the fields you tell it to track. If you're really concerned with the amount of data that needs to be stored you might prefer a library like vestal_versions, which only stores the changes you made, not a complete copy of each version.

Upvotes: 3

Related Questions