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

create_association in resource policy does not work with belongs_to associations, only on has_many #3266

Open
2 of 4 tasks
NowakJR opened this issue Sep 25, 2024 · 3 comments
Assignees

Comments

@NowakJR
Copy link
Contributor

NowakJR commented Sep 25, 2024

Context

def create_association?
   false
end

does not hide "create new association" button if relation is belongs_to, seems to work fine with has_many
The workaround is adding can_create: false to belongs_to field, then the button wont be visible, but it would be nice to have it all in one place

System configuration

Avo version: 3.7.4

Rails version: 7.0.8.4

Ruby version: 3.2.2

License type

  • Community
  • Pro

Are you using Avo monkey patches, overriding views or view components?

  • Yes. If so, please post code samples.
  • No
@Paul-Bob
Copy link
Contributor

Paul-Bob commented Oct 3, 2024

Copy link
Contributor

This issue has been marked as stale because there was no activity for the past 15 days.

@github-actions github-actions bot added the Stale label Oct 19, 2024
Copy link
Contributor

github-actions bot commented Nov 3, 2024

Closing this because there was no activity for the past 15 days. Feel free to reopen if new information pops up ✌️

@github-actions github-actions bot closed this as completed Nov 3, 2024
@Paul-Bob Paul-Bob removed the Stale label Nov 4, 2024
@Paul-Bob Paul-Bob reopened this Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: To Do
Development

No branches or pull requests

2 participants