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
Nov 02, 2017
by
John Hawthorn
Committed by
GitHub
Nov 02, 2017
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
Hide 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
association_data
.
really_destroy!
end
end
write_attribute
(
paranoia_column
,
current_time_from_proper_timezone
)
update_columns
(
paranoia_destroy_attributes
)
destroy_without_paranoia
end
end
...
...
test/paranoia_test.rb
View file @
3092f363
...
...
@@ -546,6 +546,14 @@ class ParanoiaTest < test_framework
assert
model
.
instance_variable_get
(
:@real_destroy_callback_called
)
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
model
=
ParanoidModel
.
new
model
.
save
...
...
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