#2024: Add artcomm metatag

This commit is contained in:
Toks
2013-11-20 12:08:05 -05:00
parent e818b29ff8
commit bafb236020
2 changed files with 13 additions and 1 deletions

View File

@@ -233,6 +233,13 @@ class PostQueryBuilder
has_constraints!
end
if q[:artcomm_ids]
q[:artcomm_ids].each do |artcomm_id|
relation = relation.where(:id => ArtistCommentaryVersion.where("updater_id = ?", artcomm_id).select("post_id").uniq)
end
has_constraints!
end
if q[:post_id_negated]
relation = relation.where("posts.id <> ?", q[:post_id_negated])
end