use select distinct as opposed to group by
This commit is contained in:
parent
161d9d527c
commit
805346c70c
1 changed files with 1 additions and 1 deletions
|
|
@ -38,7 +38,7 @@ class StatusMessage < Post
|
||||||
}
|
}
|
||||||
|
|
||||||
scope :commented_by, lambda { |person|
|
scope :commented_by, lambda { |person|
|
||||||
joins(:comments).where(:comments => {:author_id => person.id}).group("posts.id")
|
joins(:comments).where(:comments => {:author_id => person.id}).select("DISTINCT posts.id")
|
||||||
}
|
}
|
||||||
|
|
||||||
def self.user_tag_stream(user, tag_ids)
|
def self.user_tag_stream(user, tag_ids)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue