ruby on rails - How do I redirect devise sign_in path to a different controller and view? Note:This is before the authentication happens -


right in app users can sign in @ /users/sign_in . rather have them sign in , sign @ same place have view created @ /home/all. being said, how make sure every time users go /users/sign_in or /users/sign_up redirect /home/all ?

thanks

you can overriding devise's default route,

 "/users/sign_up" => 'home#all'  "/users/sign_in" => 'home#all' 

write lines in routes file before, devise_for :users.

whenever request comes /users/sign_up/ or /users/sign_in/, handled home#all


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -