Preventing the back action after logout in Rails.
Aug 28, 2017 · 1 min read
While working on the rails project I have found that once the logged in user logout from the application and press the browsers back button the user get redirected to the page that should only be viewed to the logged in user.
To resolve this issue I have added a action to the application_controller.rb
This works fine in my chrome and firefox browser but to make it work in safari too I have added added a javascript onunload function to my application.htm.erb
This woks fine in all three browser.
