I need to be able to set my nav on the current page depending on which page the user was perviously on.
e.g
pageX => pageA(tab1selected)
pageY => pageA(tab2selected)
I know from reading you can use request.env[“HTTP_REFERER”] but I read this doesnt always get return if the user has a firewall etc
I am using devise in my app if that helps.
Is there another method ?
Thanks
Alex
Though not a quick solution, it works:
At the end each controller with view, call a method to set your store your current action in the session. If you use several controllers, then create another variable for the controller.
e.g.
You can recreate the set_action method in each controller, or make a helper and then use 2 arguments: