session[:user => user, :user_id => [user.id, user.salt]]
For some reason, that never worked for me.
T开发者_如何学Pythonhoughts on how I can achieve the following code in one line:
session[:user] = user
session[:user_id] = [user.id, user.salt]
Try
session.merge({:user => user, :user_id => [user.id, user.salt]})
I stuck with the original syntax, because I couldn't find an alternative.
精彩评论