提交 f45d06e1 编写于 作者: V Vipul A M 提交者: GitHub

Merge pull request #25363 from kamipo/fix_or_result_sql

Fix `or` result SQL [ci skip]
......@@ -658,7 +658,7 @@ def rewhere(conditions)
# present). Neither relation may have a #limit, #offset, or #distinct set.
#
# Post.where("id = 1").or(Post.where("author_id = 3"))
# # SELECT `posts`.* FROM `posts` WHERE (('id = 1' OR 'author_id = 3'))
# # SELECT `posts`.* FROM `posts` WHERE ((id = 1) OR (author_id = 3))
#
def or(other)
unless other.is_a? Relation
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册