Small gem to add soft delete feature to active record
How to use my plugin.
Add this line to your application's Gemfile:
And then execute:
$ bundle install
Or install it yourself as:
$ gem install oweb3_soft_delete
Adding migration to the model
rails g migration AddSoftDeletedToMyModel soft_deleted:datetime:index
In your model
To add a default_scope simply add acts_as_soft_delete
class MyModel < ActiveRecord::Base acts_as_soft_delete # ... end
To soft delete and item :
To find and undelete an item
The gem is available as open source under the terms of the MIT License.