lib/sorcery/model/adapters/mongoid.rb in sorcery-0.7.8 vs lib/sorcery/model/adapters/mongoid.rb in sorcery-0.7.9

- old
+ new

@@ -70,11 +70,11 @@ end def get_current_users config = sorcery_config where(config.last_activity_at_attribute_name.ne => nil) \ - .and("this.#{config.last_logout_at_attribute_name} == null || this.#{config.last_activity_at_attribute_name} > this.#{config.last_logout_at_attribute_name}") \ - .and(config.last_activity_at_attribute_name.gt => config.activity_timeout.seconds.ago.utc).order_by([:_id,:asc]) + .where("this.#{config.last_logout_at_attribute_name} == null || this.#{config.last_activity_at_attribute_name} > this.#{config.last_logout_at_attribute_name}") \ + .where(config.last_activity_at_attribute_name.gt => config.activity_timeout.seconds.ago.utc).order_by([:_id,:asc]) end end end end end