NoamB/sorcery — pull request #206 by stephan778 (2012-02-09 21:36:26+00:00)
Title: current_users + Mongoid

Hi,

I've been using sorcery for a while and it's been working great. Just a couple of hours ago I've discovered that there is a function "current_users" and wanted to try it out. Unfortunately, I couldn't get it to work for me. Here's what I got:

>undefined method `to_i' for :last_logout_at

It seems that the query inside current_users method for Mongoid adapter isn't valid, so I tried to fix it. With this fix it does work for me, not sure about the performance for that though (running javascript to test each record).