[RAILS] ActionController :: InvalidAuthenticityToken error resolution
While learning Rails, when I tried to log in from logout, I got an error like the title.
What I did to solve it
First, change the logout action of users_controller.rb as follows.
def logout
session[:user_id] = nil
flash[:notice] = "logged out"
 redirect_to("/login")
end
Changes
It was fixed by adding flash and changing the redirect destination to/login.