You can clone with
Welcome to the acts_as_paranoid wiki!
To install to your Rails project:
$ script/plugin install git://github.com/technoweenie/acts_as_paranoid.git
from your project root directory.
Add a deleted_at column to the Model you want to make paranoid (NB replace “user” with the singular form of your Model):
$ script/generate migration add_deleted_at_to_user deleted_at:datetime
(don’t forget to run the migration)
Add acts_as_paranoid to your Model e.g.
class User < ActiveRecord::Base
Now whenever destroy is called on that model, it is just removed from view and the deleted_at column set to the current date time. All the finder methods ignore “deleted” records.
If you want to see the hidden records, you can pass :with_deleted or :only_deleted to your find() call.
Last edited by ashleytowers, September 12, 2010