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
f69132e2
Commit
f69132e2
authored
Nov 15, 2012
by
Ryan Bigg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Include table name in query for only_deleted
Fixes #27
parent
131cb29d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
+2
-1
lib/paranoia.rb
+2
-1
No files found.
lib/paranoia.rb
View file @
f69132e2
...
@@ -7,8 +7,9 @@ module Paranoia
...
@@ -7,8 +7,9 @@ module Paranoia
def
paranoid?
;
true
;
end
def
paranoid?
;
true
;
end
def
only_deleted
def
only_deleted
scoped
.
tap
{
|
x
|
x
.
default_scoped
=
false
}.
where
(
"deleted_at is not null"
)
scoped
.
tap
{
|
x
|
x
.
default_scoped
=
false
}.
where
(
"
#{
self
.
table_name
}
.
deleted_at is not null"
)
end
end
def
with_deleted
def
with_deleted
scoped
.
tap
{
|
x
|
x
.
default_scoped
=
false
}
scoped
.
tap
{
|
x
|
x
.
default_scoped
=
false
}
end
end
...
...
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