[LRUG] Today's monthly meeting and paper_trail

Paul Jolly paul at myitcv.org.uk
Tue Aug 13 05:52:54 PDT 2013


Andy, James - thanks for the responses.

> I would be inclined to first ask yourself what your goal is. If you just
> need to produce an audit trail you may not need all the versioning and
> ability to undo etc. I would think about performance and database load if
> you are building something that will have a heavy load or is it going to be
> more of a boutique app where you can think about performance later.
>
> Personally I haven't had the occasion to use paper_trail at scale / under
> load.  However by design it's easy to archive or remove old versions; and
> you can use a table per versioned model, if you want, to help keep things
> manageable.
>
> Finally it's worth mentioning that paper_trail is still actively developed
> – thanks to @fullbridge-batkins – so if you run into a problem you'll
> receive prompt support.
>

This is great to hear. Even without full support for has_* associations it
looks great (that said I have some thoughts about how this can be
implemented which I will share via github)

My intention is to use it roughly as follows:

   1. Every model has_paper_trail
   2. No model can ever be destroyed (enforced via a before_destroy
   callback)
   3. Each model therefore has a state field in lieu of point 2 (but
   clearly the state can be more complicated)

My use case is stronger than a simple audit trail - whilst we will never
need to be able to rollback, we will need to be able to see object (and
association) state  at a point in time/version (c.f. TimeMachine)

Best,


Paul
-- 
+447748 105236
paul at myitcv.org.uk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20130813/b5449154/attachment.html>


More information about the Chat mailing list