hi list, how to iterate over the Session object to reset all session keys (after a logout for example) session[''something'']=nil session[''another_key'']=nil ... is there something like session.keys{|aSessionKey| session[aSessionKey]=nil} ? thanks arnaud
You''re making things difficult for yourself - take a look at reset_session On 4 Jul 2006, at 11:35, Arnaud Garcia wrote:> hi list, > > how to iterate over the Session object to reset all session keys > (after a logout for example) > session[''something'']=nil > session[''another_key'']=nil > ... > > is there something like session.keys{|aSessionKey| session > [aSessionKey]=nil} ? > > thanks > > > arnaud > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
thanks ! I didn''t know this method ;-) Jonathan del Strother a ?crit :> You''re making things difficult for yourself - take a look at > reset_session > > On 4 Jul 2006, at 11:35, Arnaud Garcia wrote: > >> hi list, >> >> how to iterate over the Session object to reset all session keys >> (after a logout for example) >> session[''something'']=nil >> session[''another_key'']=nil >> ... >> >> is there something like session.keys{|aSessionKey| session >> [aSessionKey]=nil} ? >> >> thanks >> >> >> arnaud >> >> _______________________________________________ >> Rails mailing list >> Rails@lists.rubyonrails.org >> http://lists.rubyonrails.org/mailman/listinfo/rails > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >