# Is there a way to version the contents of a table as a set?

**URL:** <https://www.ruby-forum.com/t/is-there-a-way-to-version-the-contents-of-a-table-as-a-set/59612>\
**Category:** Rails\
**Created:** [May 4, 2006, 5:34pm UTC](https://www.ruby-forum.com/t/is-there-a-way-to-version-the-contents-of-a-table-as-a-set/59612 "2006-05-04T17:34:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eden\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/6de8d8/32.png) [@Eden\_B](https://www.ruby-forum.com/u/Eden_B)\
**Post date:** [May 4, 2006, 5:34pm UTC](https://www.ruby-forum.com/t/is-there-a-way-to-version-the-contents-of-a-table-as-a-set/59612/1 "2006-05-04T17:34:26Z")

</div>

I am looking at using acts\_as\_versioned to manage revisions of data in  
several tables in my application. However, the default behavior of  
acts\_as\_versioned appears to apply to individual rows within a table.  
The  
tables I want to version are complicated lookup tables and what I really  
want is to version the entire contents of each table as a single set.  
Adding a row, deleting a row, or updating one or more rows should update  
the  
version of all rows. Is there a way to use acts\_as\_versioned to  
accomplish  
this? Is there a different approach that anyone can recommend?

---

<div class="post-metadata">

**Author:** ![Eden\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/6de8d8/32.png) [@Eden\_B](https://www.ruby-forum.com/u/Eden_B)\
**Post date:** [May 4, 2006, 7:39pm UTC](https://www.ruby-forum.com/t/is-there-a-way-to-version-the-contents-of-a-table-as-a-set/59612/2 "2006-05-04T19:39:55Z")

</div>

“Eden B.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) writes:

> I am looking at using acts\_as\_versioned to manage revisions of data in  
> several tables in my application. However, the default behavior of  
> acts\_as\_versioned appears to apply to individual rows within a table. The  
> tables I want to version are complicated lookup tables and what I really  
> want is to version the entire contents of each table as a single set.

Store the `diff’ after each insertion/deletion/update transaction.

> Adding a row, deleting a row, or updating one or more rows should update the  
> version of all rows. Is there a way to use acts\_as\_versioned to accomplish  
> this? Is there a different approach that anyone can recommend?

–  
Surendra S.  
[http://ssinghi.kreeti.com](http://ssinghi.kreeti.com), [http://www.kreeti.com](http://www.kreeti.com)  
Read my blog at: [http://cuttingtheredtape.blogspot.com/](http://cuttingtheredtape.blogspot.com/)  
,----  
| “O thou my friend! The prosperity of Crime is like unto the lightning,  
| whose traitorous brilliancies embellish the atmosphere but for an  
| instant, in order to hurl into death’s very depths the luckless one  
| they have dazzled.” – Marquis de Sade  
`----

---

<div class="post-metadata">

**Author:** ![Eden\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/6de8d8/32.png) [@Eden\_B](https://www.ruby-forum.com/u/Eden_B)\
**Post date:** [May 4, 2006, 7:49pm UTC](https://www.ruby-forum.com/t/is-there-a-way-to-version-the-contents-of-a-table-as-a-set/59612/3 "2006-05-04T19:49:08Z")

</div>

I think I understand your suggestion. It sounds like you are saying  
that  
there is no existing plugin to handle this and I should build my own  
solution?

Thanks,

Eden
