Rails versioning with point-in-time query

Is there a Rails 3 model versioning plugin that supports point-in-time queries (not just recovery) in an SQL database?

To be concrete: I have a table, documents. I want to be able to say, "as of 9/17/2010, which documents contained the text 'foo'?". This requirement seems to rule out all of the single-table versioning solutions like vestal_versions, and none of the other ones seem to have this feature either. All of the plugins I've looked at are documented as black boxes, so perhaps they store enough data internally to do this sort of query but you would never know it from the docs. In terms of Slowly Changing Dimensions, Type 2 is probably the sort of solution I'm looking for, although ultimately I'll use whatever works.

I also need to keep track of which user made changes, although that's probably possible to do outside of the versioning system too.

Is there one that I'm missing? Or am I using the wrong search term? Or do I get to roll my own?


I think you get to roll your own. If you really need to be able to perform queries on the versions, then the versions should probably be their own model, and making a versioning gem bend to fit your needs will be more painful than doing it yourself.

Sorry, and have fun :/

Need Your Help

select p text jquery

javascript jquery select text

I'm retrieving data from mysql like this structure =>

accepting user data from users and displaying it

javascript mysql database html-form

I am new to web programming. I am currently using an html form which accepts data (many fields with different datatypes eg. date) and add it to mysql server using php and display everyones form