mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
fix StiAutoloading example code
without the `.unscoped` call this can break if a base model happens to have a default scope.
This commit is contained in:
parent
d9dc569d5b
commit
e2a4512dc8
1 changed files with 1 additions and 0 deletions
|
@ -230,6 +230,7 @@ module StiPreload
|
|||
def preload_sti
|
||||
types_in_db = \
|
||||
base_class.
|
||||
unscoped.
|
||||
select(inheritance_column).
|
||||
distinct.
|
||||
pluck(inheritance_column).
|
||||
|
|
Loading…
Reference in a new issue