counting sessions

Nick,

   > how can i count sessions??
   > Like ex. 50 users logged on

Have a look at the Beast project code:

       http://svn.techno-weenie.net/projects/beast/
  http://beast.caboo.se/forums/1/topics/4

Usage (in view)
    ...
    Guests online: <%= Session.active_count %>
    ...
  
Implementation:
    
file: model/session.rb
  Session = CGI::Session::ActiveRecordStore::Session
  Session.class_eval do
    def self.active_count
      count(:all, :conditions => ["updated_at > ?", Time.now.utc-5.minutes])
    end
  end

! it requires you store sessions in the db :

=> in environment.rb, uncomment:
    ...
    config.action_controller.session_store = :active_record_store
    ...

Alain