acts_as_versionable for the newest_rails versions with dirty attributes handling
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
generators/versionize
lib
test
.gitignore
MIT-LICENSE
README.rdoc
Rakefile
init.rb
install.rb
uninstall.rb

README.rdoc

Acts As Versionable

Why?

Since I found no good plugins/gems I decided to write my own.

 * acts_as_versioned does not support current rails with dirty attribute handling
 * version_fu does not provide easy to use sintax

Goals?

* Tracking the versions.
* Applying diffs to the versions of to the specific instances of the model.
* Reverting bitween versions.
* Will give you possibility track changes on only required fields of your model.

Installation

Simply run `script/plugin install git://github.com/xedin/acts_as_versionable.git`

Example

article = Article.create(:title => 'title', :body => 'body')
article.version => 1

article.title = 'new title'
article.save => true
article.version => 2
article.versions => Array(2)
article.revert_to(1) => #<Article ...>

article.diff_with_version(2) # diff between versions is possible
article.diff(Article.new(:title => ...)) # diff by instance

Copyright © 2009 Pavel Yaskevich, released under the MIT license