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.
ok that works but when i run
def isonline
for current_session in
CGI::Session::ActiveRecordStore::Session.find(:all)
if current_session[:user_id] == self.id
return true
end
end
return false
end
i get false back everytime even when i know the user is online