fixes #1643
This commit is contained in:
@@ -274,6 +274,8 @@ class PostQueryBuilder
|
|||||||
relation = relation.where("posts.score > 0 and posts.created_at >= ?", 2.days.ago)
|
relation = relation.where("posts.score > 0 and posts.created_at >= ?", 2.days.ago)
|
||||||
elsif q[:order] == "rank2"
|
elsif q[:order] == "rank2"
|
||||||
relation = relation.where("posts.fav_count > 0 and posts.created_at >= ?", 2.days.ago)
|
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
|
end
|
||||||
|
|
||||||
case q[:order]
|
case q[:order]
|
||||||
|
|||||||
Reference in New Issue
Block a user