I have user resource and model. when I opens user page the url is like /users/:id. It is the default url for show action. But I want something like this --> localhost:3000/8-random-alphanumeric-characters. my routes file:
#for User model
resources :users
get 'signup' => 'users#new'
User resource information,
:id =1
HTTP(Method) URL Action Named route Purpose
GET /users index users_path page to list all users
GET /users/1 show user_path(user) page to show user
GET /users/new new new_user_path page to make a new user (signup)
POST /users create users_path create a new user
GET /users/1/edit edit edit_user_path(user) page to edit user with id 1
PATCH /users/1 update user_path(user) update user
DELETE /users/1 destroy user_path(user) delete user
I want /users/1
to be /8-digit-alphanumeric-random-string.