This commit is contained in:
Toks
2013-10-09 14:19:29 -04:00
parent 34716298b6
commit ea41c1b86a
2 changed files with 10 additions and 1 deletions

View File

@@ -246,6 +246,12 @@ class PostQueryBuilder
has_constraints!
end
if q[:child] == "none"
relation = relation.where("posts.has_children = FALSE")
elsif q[:child] == "any"
relation = relation.where("posts.has_children = TRUE")
end
if q[:rating] =~ /^q/
relation = relation.where("posts.rating = 'q'")
elsif q[:rating] =~ /^s/