I was worried because I couldn't use redirect_back to get the error message because I didn't understand the difference between redirect_to and render. If anyone is worried, I hope I can help as much as possible.
redirect_to Executes the specified action once and displays the view corresponding to that action By the way, redirect_back works the same as redirect_to and can return the user to the previous page.
render Show view file without taking action
-Redirect_to: controller-> URL-> route-> controller-> view -Render: controller → view
-Render: If login or input format fails, etc. = Just display an error -Redirect_to: When data update / deletion is required = controller processing is required