Eden Brandeis
2006-May-04 15:32 UTC
[Rails] Is there a way to version the contents of a table as a set?
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? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060504/437453e2/attachment.html
Surendra Singhi
2006-May-04 17:37 UTC
[Rails] Re: Is there a way to version the contents of a table as a set?
"Eden Brandeis" <ebrandeis@gmail.com> 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 Singhi http://ssinghi.kreeti.com, http://www.kreeti.com Read my blog at: 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 `----
Eden Brandeis
2006-May-04 17:47 UTC
[Rails] Re: Is there a way to version the contents of a table as a set?
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 On 5/4/06, Surendra Singhi <efuzzyone@netscape.net> wrote:> > "Eden Brandeis" <ebrandeis@gmail.com> 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 Singhi > http://ssinghi.kreeti.com, http://www.kreeti.com > Read my blog at: 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 > `---- > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060504/6440eb2e/attachment.html