Revert "use select distinct as opposed to group by". Using a distinct

causes a 500

This reverts commit 805346c70c.
This commit is contained in:
danielgrippi 2011-11-28 15:17:36 -08:00
parent 805346c70c
commit 873e04f24d

View file

@ -38,7 +38,7 @@ class StatusMessage < Post
}
scope :commented_by, lambda { |person|
joins(:comments).where(:comments => {:author_id => person.id}).select("DISTINCT posts.id")
joins(:comments).where(:comments => {:author_id => person.id}).group("posts.id")
}
def self.user_tag_stream(user, tag_ids)