Repository navigation
Refs #28025 nullify *_type column on polymorphic associations on :nu… - #28078
Conversation
|
Thanks for the pull request, and welcome! The Rails team is excited to review your changes, and you should hear from @eileencodes (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. This repository is being automatically checked for code quality issues using Code Climate. You can see results for this analysis in the PR status below. Newly introduced issues should be fixed before a Pull Request is considered ready to review. Please see the contribution instructions for more information. |
c7b881d to
12b81b8
Compare
|
Nice! I think this needs to be extended to handle to polymorphic |
gmcgibbon
left a comment
There was a problem hiding this comment.
da151d8 to
4940d90
Compare
|
@gmcgibbon @haines thanks for the feedback. I made some changes can you have a look? |
haines
left a comment
There was a problem hiding this comment.
Thanks for adding it to the has_one, this looks good to me!
gmcgibbon
left a comment
There was a problem hiding this comment.
Nice job! Please squash your commits and add a changelog entry in activerecord/CHANGELOG to make this mergeable.
4940d90 to
df85d55
Compare
|
@gmcgibbon thank you for the feedback. Squashed and updated CHANGELOG / docs. |
gmcgibbon
left a comment
There was a problem hiding this comment.
Sorry, two more things and then it should be good to go!
df85d55 to
17d2993
Compare
|
@gmcgibbon Updated. Thanks. |
eileencodes
left a comment
There was a problem hiding this comment.
This looks good to me. Sorry for the delay @laertispappas - can you fix the conflicts and I can merge once that's done.
17d2993 to
e5a9774
Compare
|
@eileencodes @kamipo thanks for the feedback. I've made some changes. |
acf4f37 to
f2c7614
Compare
49b180a to
bdf59e5
Compare
…r :nullify deletion strategy
bdf59e5 to
105f6f6
Compare
105f6f6 to
78bb689
Compare
|
Thanks! |
|
Pleasure |

Nullify polymorphic *_type column on dependent: :nullify strategy.
Summary
This PR addresses the issue described in #28025. On
dependent: :nullifystrategy only the foreign key of the relation is nullified. However on polymorphic associations the*_typecolumn is not nullified leaving the record with a NULL*_idbut the*_typecolumn is present.