Forum: Ruby on Rails Active session list

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
043ed3599451a7427bd315af1eee57de?d=identicon&s=25 bioform (Guest)
on 2007-03-19 16:00
(Received via mailing list)
Hi all
Does anybody know how to get active session list or list of active
session ID in RubyOnRails?

Thanks
0900e6a4828bd989f96427082c6c74ca?d=identicon&s=25 Mike Garey (random52k)
on 2007-03-19 16:42
(Received via mailing list)
if you're using Active Record Store, look at
CGI::Session::ActiveRecordStore::Session

Mike
043ed3599451a7427bd315af1eee57de?d=identicon&s=25 bioform (Guest)
on 2007-03-20 08:53
(Received via mailing list)
Actually I used default store for session(as I understand it is file
store).
In any case I don't want to have dependency from session store type.
I saw many sites with "Now [N] users on site" - so I think exists
standard way to define active session list.
0900e6a4828bd989f96427082c6c74ca?d=identicon&s=25 Mike Garey (random52k)
on 2007-03-20 23:18
(Received via mailing list)
the default session store for the next version of rails will be cookies.

You can follow the directions here:

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

you should also look at sql session store, which is a very good
replacement for ActiveRecord sessions:

http://railsexpress.de/blog/articles/2006/09/15/sq...

Mike
043ed3599451a7427bd315af1eee57de?d=identicon&s=25 bioform (Guest)
on 2007-03-22 09:16
(Received via mailing list)
I don't want to use database as session storage...
I thought about this issue and I think that I can extend "new" and
"delete" method of session(ActionController::Integration::Session)
class.
1. in "new" method I will add new session to global session list;
2. in "delete" method I will remove session from this list.

At current point I don't know how to create variable that exists in
all application live cycle.

Andrew
This topic is locked and can not be replied to.