sessions

why do you add a user_id column? thats not the way activeRecordStore
works ...

all data that you put in a session gets serialized and saved in one
column.

when the user logs on, you would just do:

session[:user_id] = @user.id

WITHOUT having a user_id column in the sessions table. Rails handles it
for you.

don't know if you have read this article but it should answer your question

http://habtm.com/articles/2005/12/15/whos-online

Chris