westonganger / active_snapshot

Simplified snapshots and restoration for ActiveRecord models and associations with a transparent white-box implementation
MIT License
103 stars 16 forks source link

Process including ActionText::RichText fields? #47

Open erwin opened 6 months ago

erwin commented 6 months ago

I've been using PaperTrail but ran into difficulty trying to save and restore ActionText::RichText fields.

I saw you also have a PaperTrail plugin paper_trail-association_tracking...

It seems so odd to me that neither PaperTrail, paper_trail-association_tracking, or active_snapshot directly address the issue of how to handle versioning when some of your fields are ActionText::RichText fields, I would think these would be some of the most important fields to store version history for...

There's a stackoverflow post about using PaperTrail with ActionText, but it doesn't seem to have a clear accepted solution.

https://stackoverflow.com/a/76982798/

I'm fine to continue using PaperTrail, I'm fine to use something else.

So far the only place I've seen this addressed clearly is this DriftingRuby video:

https://www.driftingruby.com/episodes/tracking-changes-on-action-text

Seeing as how your an expert on snapshotting ruby and associations, would be awesome if you could share your thoughts on this!

westonganger commented 6 months ago

I fail to see what any of these libraries should be doing different. Seems the stack overflow code you posted or some other custom app logic would be required to call the new snapshot method.

If you have a proposal happy to discuss but from my point of view you are describing app code not library code.