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
3092f363
Unverified
Commit
3092f363
authored
7 years ago
by
John Hawthorn
Committed by
GitHub
7 years ago
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #425 from jhawthorn/steverice-326-really-destroy-with-sentinel-value
Rebase of #412
parents
ea0a0cee
97623f17
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletions
+9
-1
lib/paranoia.rb
+1
-1
test/paranoia_test.rb
+8
-0
No files found.
lib/paranoia.rb
View file @
3092f363
...
@@ -165,7 +165,7 @@ module Paranoia
...
@@ -165,7 +165,7 @@ module Paranoia
association_data
.
really_destroy!
association_data
.
really_destroy!
end
end
end
end
write_attribute
(
paranoia_column
,
current_time_from_proper_timezone
)
update_columns
(
paranoia_destroy_attributes
)
destroy_without_paranoia
destroy_without_paranoia
end
end
end
end
...
...
This diff is collapsed.
Click to expand it.
test/paranoia_test.rb
View file @
3092f363
...
@@ -546,6 +546,14 @@ class ParanoiaTest < test_framework
...
@@ -546,6 +546,14 @@ class ParanoiaTest < test_framework
assert
model
.
instance_variable_get
(
:@real_destroy_callback_called
)
assert
model
.
instance_variable_get
(
:@real_destroy_callback_called
)
end
end
def
test_really_destroy_behavior_for_active_column_model
model
=
ActiveColumnModel
.
new
model
.
save
model
.
really_destroy!
refute
ParanoidModel
.
unscoped
.
exists?
(
model
.
id
)
end
def
test_really_delete
def
test_really_delete
model
=
ParanoidModel
.
new
model
=
ParanoidModel
.
new
model
.
save
model
.
save
...
...
This diff is collapsed.
Click to expand it.
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