提交 f5a635e4 编写于 作者: A Aaron Patterson

where needs to bring the bind params when creating a new relation

上级 b5f679b5
......@@ -58,6 +58,9 @@ def except(*skips)
# Post.order('id asc').only(:where) # discards the order condition
# Post.order('id asc').only(:where, :order) # uses the specified order
def only(*onlies)
if onlies.any? { |o| o == :where }
onlies << :bind
end
relation_with values.slice(*onlies)
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册