Clear all sessions keys

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

thanks ! I didn’t know this method :wink:

Jonathan del Strother a écrit :

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs