Skip to content

Commit

Permalink
Correct README.rdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
aq1018 committed Sep 7, 2011
1 parent 084c285 commit 27ae3ac
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions README.rdoc
Expand Up @@ -79,7 +79,7 @@ Here is an example of setting the tracker class name using a rails initializer
track_history :on => [:title, :body], :scope => :post, :track_create => true, :track_destroy => true
end

# The modifier can be specified as well
# The modifier can be specified as well
class User
include Mongoid::Document
include Mongoid::Timestamps
Expand All @@ -97,30 +97,30 @@ Here is an example of setting the tracker class name using a rails initializer

track = comment.history_tracks.last

track.undo! # comment title should be "Test"
track.undo! user # comment title should be "Test"

track.redo! # comment title should be "Test 2"
track.redo! user # comment title should be "Test 2"

# undo last change
comment.undo! @user
comment.undo! user

# undo versions 1 - 4
comment.undo! @user, :from => 4, :to => 1
comment.undo! user, :from => 4, :to => 1

# undo last 3 versions
comment.undo! @user, :last => 3
comment.undo! user, :last => 3

# redo versions 1 - 4
comment.redo! @user, :from => 1, :to => 4
comment.redo! user, :from => 1, :to => 4

# redo last 3 versions
comment.redo! @user, :last => 3
comment.redo! user, :last => 3

# delete post
post.destroy

# undelete post
post.undo! @user
post.undo! user

# disable tracking for comments within a block
Comment.disable_tracking do
Expand Down

0 comments on commit 27ae3ac

Please sign in to comment.