don't join the tags table here, it makes the query slower
This commit is contained in:
parent
74613b0b15
commit
4fa04e88ac
1 changed files with 1 additions and 1 deletions
|
|
@ -173,7 +173,7 @@ class StatusMessage < Post
|
|||
|
||||
private
|
||||
def self.tag_stream(tag_ids)
|
||||
joins(:tags).where(:tags => {:id => tag_ids})
|
||||
joins(:taggings).where('taggings.tag_id IN (?)', tag_ids)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue