The Neurochild
2008-Dec-09 20:16 UTC
Cleaning session variables when going to another link of the website
Hi there! I wish to set my session variables to null when click on a link of my Rails website. My major problem is this: when I click on a link and then return to the previous view, my session variables still remain, unless I click on a cleaning button where I set my variables to null (nil) (via a method called action, set in the forms) This is a problem when dealing with a lot of users. I type something on a text field and when I click on the submit button, it saves on a session variable and then it shows on the field as a preset value. Then I click on a link of my website, and I suddenly have the idea of returning to my previous view, via click a link. And instead of erasing the value, it''s still there. Unless I click on another button to erase the value of the session variable, It''s impossible to erase it when going somewhere else. I need help here. How do I clean those variables in that case? (When I click to another link, not a button.) An example of what I''m talking about is this: session[:variable]. I can''t erase it. Greetings... The Neurochild --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---