-
-
Notifications
You must be signed in to change notification settings - Fork 273
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
Improve message when is missing array resource for array fields #3713
Comments
Hey @Paul-Bob . |
Hi @zhephyn thanks for looking into this.
I don’t have a screenshot of the improved error message for arrays yet, as it hasn’t been implemented. The only planned change is adding the
That’s awesome, thank you! We appreciate your help.
The |
Cool. I now understand what the enhancement requires me to implement. |
Yes @zhephyn
You can trigger this error by adding |
@Paul-Bob When i do the above, for example adding this line( field :items, as: :array) to the post.rb resource file, all i get when i navigate to the show page is a flash notice shown below instead of the error above.
I already have a possible solution in mind however i can't tell whether it's feasible or not if i can't reproduce the error |
@zhephyn, could you share what the |
Looking good @zhephyn! I forgot to mention in the original scope, but let's also ensure that when the error raises on an array field, the documentation links to the array resources. |
Context
Improve the error message when a resource cannot be found for an array field.
field :items, as: :array
Current behavior:
Enhancement:
--array
flag in the generator command.Expected message:
... You may generate a resource for it by running 'rails generate avo:resource item --array'.
The text was updated successfully, but these errors were encountered: