[RAILS] Precautions when specifying the URL in render

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

Precautions when specifying the URL in render
Set the root URL when starting tomcat in intelliJ
Precautions when using checkboxes in Thymeleaf
Precautions when using querySelector () (such as some ideas when specifying the name attribute)
About specifying the validity period when saving the cache in Redis with Spring Cache
Escape processing when creating a URL in Ruby
When the server fails to start in Eclipse
When you get lost in the class name
When the project is not displayed in eclipse
Processing when an ID that does not exist in the database is entered in the URL
Get the URL of the HTTP redirect destination in Java
Get the URL of the HTTP redirect destination in Ruby
Differences in code when using the length system in Java
Template creation program when using the reminder function in slack
Install by specifying the version of Django in the Docker environment
Add quotation marks when specifying NULL for JdbcTypeForNull in application.yml
Correct the character code in Java and read from the URL
Behavior when each is executed in the reverse order Range