Readme.md in soft_deletion-0.1.10 vs Readme.md in soft_deletion-0.2.0
- old
+ new
@@ -1,21 +1,18 @@
-Explicit soft deletion for ActiveRecord via deleted_at and default scope + callbacks.<br/>
+Explicit soft deletion for ActiveRecord via deleted_at + callbacks and optional default scope.<br/>
Not overwriting destroy or delete.
Install
=======
gem install soft_deletion
-Or
- rails plugin install git://github.com/grosser/soft_deletion.git
-
-
Usage
=====
- # mix into any model ...
+ require 'soft_deletion'
+
class User < ActiveRecord::Base
- include SoftDeletion
+ has_soft_deletion :default_scope => true
after_soft_delete :send_deletion_emails # Rails 2 + 3
set_callback :soft_delete, :after, :prepare_emails # Rails 3
has_many :products
@@ -42,10 +39,10 @@
User.soft_delete_all!(1,2,3,4)
TODO
====
- - Rails 3 from with inspiration from https://github.com/JackDanger/permanent_records/blob/master/lib/permanent_records.rb
+ - Rails 3 with inspiration from https://github.com/JackDanger/permanent_records/blob/master/lib/permanent_records.rb
- maybe stuff from https://github.com/smoku/soft_delete
Authors
=======