Commit e0e1d300 by Aditya Sanghi

updated readme

parent 7e9adb2a
...@@ -60,6 +60,18 @@ If you want a method to be called on destroy, simply provide a _before\_destroy_ ...@@ -60,6 +60,18 @@ If you want a method to be called on destroy, simply provide a _before\_destroy_
... ...
end end
You can replace the older acts_as_paranoid methods as follows:
find_with_deleted(:all) => unscoped
find_with_deleted(:first) => unscoped.first
find_with_deleted(id) => unscoped.find(id)
find_with_deleted([id1,id2]) => unscoped.find([id1,id2])
find_only_deleted(:all) => unscoped.where("deleted_at is not null")
find_only_deleted(:first) => unscoped.where("deleted_at is not null").first
find_only_deleted(id) => unscoped.where("deleted_at is not null").find(id)
find_only_deleted([id1,id2]) => unscoped.where("deleted_at is not null").find([id1,id2])
## License ## License
This gem is released under the MIT license. This gem is released under the MIT license.
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment