In Rails, I wanted to create a user edit page and created an update action.
At that time, I wrote the code using an if statement, but if the data change fails,
render("users/#{@user.id}/edit)
I was specifying the path like this.
The correct answer is
render("users/edit")
is.
When using render, the inside of () is ("folder name/file name").
I learned one more thing.
Recommended Posts