views:

16

answers:

2
session[:user => user, :user_id => [user.id, user.salt]]

For some reason, that never worked for me.

Thoughts on how I can achieve the following code in one line:

session[:user] = user
session[:user_id] = [user.id, user.salt]
A: 

Try

 session.merge({:user => user, :user_id => [user.id, user.salt]})
Lucho
Nope...that didn't work for me :(
marcamillion