Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
paranoia
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ikcrm_common
paranoia
Commits
ecbed9e5
Commit
ecbed9e5
authored
Dec 18, 2013
by
Ryan Bigg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Syntax highlighting makes everything better
parent
19ad6c6e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
README.md
+7
-7
No files found.
README.md
View file @
ecbed9e5
...
...
@@ -119,43 +119,43 @@ end
If you want to find all records, even those which are deleted:
```
```
ruby
Client
.
with_deleted
```
If you want to find only the deleted records:
```
```
ruby
Client
.
only_deleted
```
If you want to check if a record is soft-deleted:
```
```
ruby
client
.
destroyed?
```
If you want to restore a record:
```
```
ruby
Client
.
restore
(
id
)
```
If you want to restore a whole bunch of records:
```
```
ruby
Client
.
restore
([
id1
,
id2
,
...
,
idN
])
```
If you want to restore a record and their dependently destroyed associated records:
```
```
ruby
Client
.
restore
(
id
,
:restore
=>
true
)
```
If you want callbacks to trigger before a restore:
```
```
ruby
before_restore
:callback_name_goes_here
```
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment