fix appearance of other tags when viewing single tag
don't just pull taggings where the tag id matches, pull all stories where the id is in the list of stories tagged with that tag
This commit is contained in:
parent
2ba78cc10e
commit
c2206f46cd
|
@ -63,7 +63,8 @@ private
|
|||
end
|
||||
|
||||
if tag
|
||||
conds[0] << "AND taggings.tag_id = ?"
|
||||
conds[0] << "AND stories.id IN (SELECT taggings.story_id FROM " <<
|
||||
"taggings WHERE taggings.tag_id = ?)"
|
||||
conds.push tag.id
|
||||
elsif user
|
||||
conds[0] += " AND taggings.tag_id NOT IN (SELECT tag_id FROM " <<
|
||||
|
|
Loading…
Reference in a new issue