Versioning of Models in Ruby on Rails?

I've worked with vestal_versions last week and yes, it is the most advanced alternative, at least in terms of space: you store just what you really need. It is an active project and the version 1.0 is going to be a huge update with many new features; just look at the 1.0 branch to know what I mean.

I've worked with vestal_versions last week and yes, it is the most advanced alternative, at least in terms of space: you store just what you really need. It is an active project and the version 1.0 is going to be a huge update with many new features; just look at the 1.0 branch to know what I mean. But after playing with it a bit, I've noticed a big flaw: performance.

Every time you need an specific version, you have to go through all intermediate ones, reconstructing the version you need. This also means you cannot edit or delete a version directly, because it can mess with modifications, broking the chain. For do this, you need to process versions adequately, what vestal_versions currently does not do.

This way, for the problem I had, I ended up with my own versioning solution. I needed performance and the ability to delete and edit versions rapidly, so I sacrificed storage and developed something similiar to act_as_versioned. BUT, if you don't need this and do not have to revert very frequently, I highly recommend vestal_versions.

It is an advanced, solid solution and an active one, with a passionate developer behind it.

I took a look at all the solutions (paper trail, acts_as_audited) and finally chose to go the same way as Lailson - to develop yet another versioning plugin (sirlantis/historical at github, work in progress). – Marcel Jackwerth Nov 9 '09 at 22:27 Just to clarify: I did not build a library, I just make a custom solution for my problem. But good luck with the plugin.

I see you did a lot of things really fast, with nice documentation. It looks promising… I'm interested on this matter and I'll keep watching your project. – Lailson Bandeira Nov 10 '09 at 2:44.

Ive been working with a gem called "paper_trail". It seems to be the best solution online at the moment. It has auditing and version control in one.

github.com/airblade/paper_trail Hope this helps!

Thanks for your answer. I have chosen to go with paper trail as well. – Mosselman Nov 8 at 17:06.

A couple of months ago I tested a couple of solutions and vestal_versions was the most effective. There's also a great screencast here from Ryan Bates. If you are looking for other alternatives, check out The Ruby Toolbox list.

Indeed, it seems to be the most advanced one. Maybe I'm wrong about how it handles migrations, I'll do some tests. And thanks for the Toolbox link!

– Marcel Jackwerth Nov 8 '09 at 22:50.

We used acts_as_audited in a project, with quite a good success. You can find that at github.com/collectiveidea/acts%5Fas%5Fau... (last commit in november :-) ).

Looks promising - i'll take a look at it. – Marcel Jackwerth Nov 8 '09 at 22:44.

So it would essentially be file-based retrieval of data, I guess...

Actually, instead of "using p4, etc. INSTEAD of a database," how about versioning/branching the database using p4, etc. By having the Rails session direct the versioning. For example, I want to check out model v4.1 so before accessing data from the database, I check out that version of the database. If I want to branch, I first issue a branch command, then keep working.

Thoughts? – Chuck Han Jan 21 at 15:16.

Another plugin is paper_trail. Here is a link to the railscasts posted today: railscasts.com/episodes/255-undo-with-pa... He also mentions why he prefers paper_trail over vestal_versions.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions