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

manage_relationship should warn if the given options is empty #1407

Open
drtheuns opened this issue Aug 26, 2024 · 0 comments · May be fixed by #1408
Open

manage_relationship should warn if the given options is empty #1407

drtheuns opened this issue Aug 26, 2024 · 0 comments · May be fixed by #1408
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@drtheuns
Copy link

Is your feature request related to a problem? Please describe.
If manage_relationship is called without opts it will do nothing. Ash could warn about this.

Describe the solution you'd like
Add a warning if manage_relationship is a no-op.

Describe alternatives you've considered
Remove the default value of the opts argument; likely not possible due to backwards compat.

Express the feature either with a change to resource syntax, or with a change to the resource interface

Ash.Changeset.manage_relationship(changeset, relationship, value)
# warning: this does nothing. Needs `type: :append` or some other configuration.

Additional context

@drtheuns drtheuns added enhancement New feature or request needs review labels Aug 26, 2024
@zachdaniel zachdaniel added good first issue Good for newcomers and removed needs review labels Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants