On an unsuccessful save, I would like to redirect to the previous view but with the error message.
redirect_to user_path(@user_id), errors: @user.errors
but in the view, when I check for errors I get an undefined variable errors.
I am not using the same controller new and create, so I can't have @user.errors.any in new.html.erb. I have two different controllers, one in which form is there, and another controller which will take care of create, if the create is not happening I need to redirect to the previous controller.