Skip to content

Commit be6eaab

Browse files
add documentation
1 parent 0bb5181 commit be6eaab

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Diff for: README.md

+15
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,21 @@ end
348348
# => NoMethodError: undefined method `with_deleted' for #<Class:0x0123456>
349349
```
350350

351+
#### delete_all:
352+
353+
The gem supports `delete_all` method, however it is disabled by default, to enabled add this in your `environment` file
354+
355+
``` ruby
356+
Paranoia.delete_all_enabled = true
357+
```
358+
alternatively, you can enable/disable it for specific models as follow:
359+
360+
``` ruby
361+
class User < ActiveRecord::Base
362+
acts_as_paranoid(delete_all_enabled: true)
363+
end
364+
```
365+
351366
## Acts As Paranoid Migration
352367

353368
You can replace the older `acts_as_paranoid` methods as follows:

0 commit comments

Comments
 (0)