fix parent error
This commit is contained in:
@@ -207,7 +207,7 @@ class PostQueryBuilder
|
|||||||
elsif q[:parent_neg] == "none" || q[:parent] == "any"
|
elsif q[:parent_neg] == "none" || q[:parent] == "any"
|
||||||
relation = relation.where("posts.parent_id IS NOT NULL")
|
relation = relation.where("posts.parent_id IS NOT NULL")
|
||||||
elsif q[:parent]
|
elsif q[:parent]
|
||||||
relation = relation.where("(posts.id = ? or posts.parent_id = ?)", q[:parent], q[:parent])
|
relation = relation.where("(posts.id = ? or posts.parent_id = ?)", q[:parent].to_i, q[:parent].to_i)
|
||||||
has_constraints!
|
has_constraints!
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user