Upon login, I would like a user to be directed to
example.com/me
and not
example.com/users/$ID_NUMBER
I’ve added the following to my routes.rb
match ‘/me’, to: ‘users#show’
And the users_controller
@user = current_user redirect_to me_url
However, I get redirection loops. I can call example.com/me without any problem, but I cannot go directly there during the login step.
You need to create the url helpers in your
routes.rbThe
:as => :mepart is what creates theme_urlandme_pathhelpers.Rails routing