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: coherence within associations fields authorization #3687

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Paul-Bob
Copy link
Contributor

@Paul-Bob Paul-Bob commented Feb 24, 2025

Description

Fixes #2614

read_only and disabled options were interfering with the rendering of attach/create buttons on has_one fields, while not affecting other association fields such as has_many.

We decided to remove these options from the attach/create functionality to maintain consistency with other fields, and now attach/create is controlled solely through authorization (attach_{association}? / create_{association}?).

🚨 Breaking Changes

Heads up: read_only and disabled don't affect has_one fields anymore.

Please search for all has_one fields still using the read_only or disabled options and update them with the correct authorization methods: attach_{association}? and create_{association}?

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

@Paul-Bob Paul-Bob self-assigned this Feb 24, 2025
@github-actions github-actions bot added the Fix label Feb 24, 2025
Copy link

codeclimate bot commented Feb 24, 2025

Code Climate has analyzed commit 92e94d7 and detected 0 issues on this pull request.

View more on Code Climate.

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.

:has_one field doesn't respect disabled
1 participant