title: Rails - List all active login/user sessions?
body: <p>I'm using Authlogic for authentication in my app with all the default options. What I want to know is if there is as way to list all the currently logged in users on the site, terminate their sessions, etc. Basically it would be an 'index' method for my 'user_sessions' controller. </p>
  
  <p>Here is what I have tried so far.</p>
  
  <p>In my <strong>user_sessions_controller.rb</strong> file.....</p>
  
  <pre><code>def index
    @user_sessions = UserSession.all
      respond_to do |format|
        format.html # index.html.erb
        format.xml  { render :xml =&gt; @user_sessions }
      end
  end
  </code></pre>
  
  <p>Which fails with an....</p>
  
  <blockquote>
    <p>undefined method `all' for UserSession:Class</p>
  </blockquote>
  
  <p>error message.</p>
  
  <p>Is there are way to list all current user sessions for the entire site?</p>
  
  <p>~Dan</p>