未验证 提交 e2a4512d 编写于 作者: J jonathan schatz 提交者: GitHub

fix StiAutoloading example code

without the `.unscoped` call this can break if a base model happens to have a default scope.
上级 d9dc569d
......@@ -230,6 +230,7 @@ module StiPreload
def preload_sti
types_in_db = \
base_class.
unscoped.
select(inheritance_column).
distinct.
pluck(inheritance_column).
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册