Skip to content
ActiveRecord plugin for versioning your models.
Pull request Compare This branch is even with wested:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
test
.gitignore
CHANGELOG
MIT-LICENSE
README
RUNNING_UNIT_TESTS
Rakefile
TODO
VERSION.yml
acts_as_versioned.gemspec
init.rb

README

= wested/acts_as_versioned

This library expands acts_as_versioned to always track the datetime the
version was created (versioned_at) and the datetime that that version was no 
longer current (version_expired_at).

An `existing_at(datetime)` named scope is added to the version models, making
it possible to do fancy things like scope, or apply to associations:

    pages = author.page_versions.existing_at(datetime)

Additionally, a simple accessor is created in the versioned model:

   page.version_at(datetime)

See the TODO file for the immediate next steps, as well as a thought about
a potentially nice approach for doing things like

    @author.version_at(datetime).pages

and having the pages that are returned be the page versions that existed at
datetime.
Something went wrong with that request. Please try again.