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

Propagate save(validate:) option for :has_one associations on autosave #43557

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

intrip
Copy link
Contributor

@intrip intrip commented Oct 28, 2021

Summary

Propagate save(validate:) option for :has_one associations on autosave.

save(validate:) option is propagated to associated records during autosave when autosave option is nil. Affects only :has_one associations.

This is a follow up of #43525 for has_one associations.
Since #43525 has not been merged yet it also encompasses the changes done in #43525.

…tosave.

`save(validate:)` option is propagated to associated records during `autosave` when `autosave`
option is `nil`. Affects only `:has_many` associations.

Fixes rails#43400
@intrip
Copy link
Contributor Author

intrip commented Oct 28, 2021

@ghiculescu I've noted that has_one associations are also affected of #43400 hence I've created this PR starting from
#43525.

WDYT?

@intrip intrip changed the title Fix 43400 has one Propagate save(validate:) option for :has_one associations on autosave Oct 28, 2021
…osave.

`save(validate:)` option is propagated to associated records during `autosave` when `autosave` option is
`nil`. Affects only `:has_one` associations.
@ghiculescu
Copy link
Member

This looks great, thank you again.

@rails-bot
Copy link

rails-bot bot commented Jan 26, 2022

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Thank you for your contributions.

@rails-bot rails-bot bot added the stale label Jan 26, 2022
@intrip
Copy link
Contributor Author

intrip commented Jan 26, 2022

ping

@rails-bot rails-bot bot removed the stale label Jan 26, 2022
@rails-bot
Copy link

rails-bot bot commented Apr 26, 2022

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Thank you for your contributions.

@rails-bot rails-bot bot added the stale label Apr 26, 2022
@intrip
Copy link
Contributor Author

intrip commented Apr 26, 2022

ping

@rails-bot rails-bot bot removed the stale label Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants