You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to understand if there is a real use case behind a generation without any attribute.
Fixing the table in the index is easy as you said by just showing the ID column. However, there are some other small changes that need to be done to make this work and I don't know if they are worthy. For example, in the FormComponent's save event it will be needed to support an empty object.
I am happy to do those changes to the generator if it helps, but I am leaning more toward the option of just fail if the phx.gen.live or others are being called without attributes.
I got the same error when I ran the phx.gen.html with --no-context and --no-schema. The use case then would be when someone generates a context with a schema first and then runs the phx.gen.html to generate the HTML scaffolding.
Environment
Actual behavior
After a generation without attributes:
and adding the routes I get an error on the view:
Expected behavior
The error itself make sense, I wonder if there are cases when it's useful to use the generator without providing attributes or it's just an error.
Please, let me know if it's an error and I can try to provide a patch.
The text was updated successfully, but these errors were encountered: