diff --git a/app/models/person.rb b/app/models/person.rb index 27cab2b..4a7d740 100644 --- a/app/models/person.rb +++ b/app/models/person.rb @@ -71,7 +71,7 @@ class Person < Profile has_many :friends, :class_name => 'Person', :through => :friendships scope :online, -> { - includes(:user).where("users.chat_status != '' AND users.chat_status_at >= ?", DateTime.now - User.expires_chat_status_every.minutes) + joins(:user).where("users.chat_status != '' AND users.chat_status_at >= ?", DateTime.now - User.expires_chat_status_every.minutes) } has_many :requested_tasks, :class_name => 'Task', :foreign_key => :requestor_id, :dependent => :destroy -- libgit2 0.21.2