the session variable and the session[:user] value are ids.  When you assign, you can use either:

self.session = Card['Gerry']
or Card['Gerry'].id

In old code, this was all the User object and it's id