This commit is contained in:
Toks
2013-06-04 21:39:32 -04:00
parent 00c9c02e87
commit 046d66db90

View File

@@ -274,6 +274,8 @@ class PostQueryBuilder
relation = relation.where("posts.score > 0 and posts.created_at >= ?", 2.days.ago)
elsif q[:order] == "rank2"
relation = relation.where("posts.fav_count > 0 and posts.created_at >= ?", 2.days.ago)
elsif q[:order] == "landscape" || q[:order] == "portrait"
relation = relation.where("posts.image_width IS NOT NULL and posts.image_height IS NOT NULL")
end
case q[:order]