Skip to content

Instantly share code, notes, and snippets.

@rich
Created April 8, 2009 18:22
Show Gist options
  • Select an option

  • Save rich/91912 to your computer and use it in GitHub Desktop.

Select an option

Save rich/91912 to your computer and use it in GitHub Desktop.
class Author < ActiveRecord::Base
acts_as_revisable :on_delete => :revise
end
class AuthorRevision < ActiveRecord::Base
acts_as_revision
end
@author = Author.create(:name => 'Rich')
@author.destroy
@deleted_author = AuthorRevision.deleted.first
@deleted_author.name # => 'Rich'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment