You can get and set session data with the same interface as hash.
session['key'] = 'value' session['array'] = [1,2,3,4,5] p session['key'] #-> 'value' p session['array'] #-> [1,2,3,4,5]