New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed Inconsistency in column_type
, allow_nulls
, recovery_value
#193
Fixed Inconsistency in column_type
, allow_nulls
, recovery_value
#193
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes perfect sense. Can you take a look at the test failures?
lib/acts_as_paranoid.rb
Outdated
@@ -5,6 +5,7 @@ | |||
require "acts_as_paranoid/associations" | |||
require "acts_as_paranoid/validations" | |||
require "acts_as_paranoid/relation" | |||
require "pry-byebug" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests are failing because of this line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed this and committed again.
63bbca2
to
4ae6596
Compare
Thank you for your review. It seems that I forgot to delete the library used during development. |
I'm experiencing some Rubocop Offenses. However, to address this warning, a refactoring that is not significantly involved in this fix is required. I'm thinking of proposing this fix in another PR again after merging this PR. |
Please don't worry about the RuboCop offenses for now. |
Was good. I was relieved. |
@mvz |
Hi @mvz , is there something holding up this PR that needs addressing? We've hit this issue when trying to upgrade to 0.7.2 as well |
Thanks for reminding me @zhengf2. I'll check this again this weekend. |
Thanks, @soartec-lab! |
This change has been released as part of version 0.7.2. |
Thank you for providing such a great gem.
I created this PR because I ran into one problem while using this gem in my project.
Expect
In case of
column type:" boolean "
andallow nulls: false
,nil
should not be stored in thedeleted
column.Actual
However, when the
recover
andrecover!
methods are used for the object of the class with the following conditions,nil
is stored in thedeleted
column.Changes
Set default value
recovery_value
tofalse
for case ofcolumn_type:" boolean "
andallow_nulls: false
.