Skip to content
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

Fix clearing the inverse relation when has_many_inversing is enabled #42729

Merged
merged 1 commit into from Jul 8, 2021

Commits on Jul 8, 2021

  1. Fix clearing the inverse relation when has_many_inversing is enabled

    rails#42601 fixed clearing the inverse relation,
    but it didn't account for collection associations.
    
    For these, just assigning `nil` isn't possible because we need the record to
    remove it from the collection.
    
    So this PR introduce an explicit method for this purpose rather than
    reuse `inversed_from(nil)`.
    byroot committed Jul 8, 2021
    Configuration menu
    Copy the full SHA
    6d7235d View commit details
    Browse the repository at this point in the history