Reputation: 5992
I need to set a flag in the session hash when a link is clicked (to toggle between basic/advanced views of a page). Is there a way to do this?
I'm thinking I can do it if I add a route for something like "change_mode" and a parameter that it accepts and the method in the controller for it would just set the value in the hash and link back to the previous page, but that feels like a hack...
Thanks.
Upvotes: 0
Views: 381
Reputation: 160231
How is it a hack? That's how you get information from the browser to the server, through a request.
Upvotes: 1