Now the app is working better. I can create and edit types by user.
Before you could not see the changes made.
Line 7 to 8:
When you do post to the param
type you do the following:
Update your type with the attributes category and name (this attributes are defined in the model type) Then redirect to the principal page: types.
When a types param is present on post: Create a type with the attributes category and name and the user id is always present. Then redirect to the main page.
Here I define the form action, I’m specifying the user id on the path.
Now I can edit and create Types.