I have this ruby function in a controller
def updateSession value
case value
when 1,2
session[:value]=1
when 3,4
session[:value]=2
end
end
And I have different links that redirect to different pages. I would like to change the session value when clicking on those links by calling the updateSession function
Is it possible and if so, how?