提交 11731385 编写于 作者: N Neeraj Singh

fix the sql that is generated from scoping

上级 5c135490
...@@ -236,8 +236,9 @@ def many? ...@@ -236,8 +236,9 @@ def many?
# Scope all queries to the current scope. # Scope all queries to the current scope.
# #
# Comment.where(post_id: 1).scoping do # Comment.where(post_id: 1).scoping do
# Comment.first # SELECT * FROM comments WHERE post_id = 1 # Comment.first
# end # end
# # => SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 ORDER BY "comments"."id" ASC LIMIT 1
# #
# Please check unscoped if you want to remove all previous scopes (including # Please check unscoped if you want to remove all previous scopes (including
# the default_scope) during the execution of a block. # the default_scope) during the execution of a block.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册