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: create new record from belongs_to associations #2049

Merged

Conversation

Paul-Bob
Copy link
Contributor

@Paul-Bob Paul-Bob commented Nov 22, 2023

Description

via_resource_id: resource.model.to_param when resource.model is not a persistent yet to_param will return nil and that's fine. But in case you use prefix_id or some other ID manipulation it will break if the attributes used on the manipulation are blank.

Fixes #2045

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

Screenshots

Manual review steps

  1. Step 1
  2. Step 2

Manual reviewer: please leave a comment with output from the test if that's the case.

@Paul-Bob Paul-Bob self-assigned this Nov 22, 2023
@github-actions github-actions bot added the Fix label Nov 22, 2023
@Paul-Bob Paul-Bob merged commit 70f4eb9 into 2.x Dec 4, 2023
12 checks passed
@Paul-Bob Paul-Bob deleted the 2.x_fix/create_new_record_from_belongs_to_associations branch December 4, 2023 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant