Simple trash for your models setting the
Add it to your
gem 'trash', :git => 'https://github.com/fesplugas/rails-trash.git'
Add to your entries the
add_column :entries, :deleted_at, :timestamp
And use it on your models.
class Post < ActiveRecord::Base has_trash default_scope where(:deleted_at => nil) end
If you want to get the
>> Entry.deleted => [...]
If you want to
restore a deleted entry:
>> Entry.deleted.first.restore => [...]
Copyright (c) 2011 Francesc Esplugas Marti, released under the MIT license