title: How can I tell whether a given Devise user is signed in right now?
body: <p>In a Rails app that uses Devise, is there a way to tell if a <strong>specific</strong> user is signed in <strong>right now</strong>?</p>
  
  <p>I know about the view helper, <code>user_signed_in?</code>. What I'm looking for is more like:</p>
  
  <pre><code>User.all.each do |user|
    puts user.signed_in?
  end
  </code></pre>
  
  <p>I see that Devise has added a <code>current_sign_in_at</code> column to <code>users</code>. But that doesn't get set to <code>NULL</code> when the user signs out, so I can't test with that.</p>
  
  <p>How can I check whether a user is currently signed in?</p>