diff --git a/guides/source/autoloading_and_reloading_constants.md b/guides/source/autoloading_and_reloading_constants.md index 0c34cdd504..e750657926 100644 --- a/guides/source/autoloading_and_reloading_constants.md +++ b/guides/source/autoloading_and_reloading_constants.md @@ -233,8 +233,7 @@ module StiPreload select(inheritance_column). distinct. pluck(inheritance_column). - compact. - each(&:constantize) + compact types_in_db.each do |type| logger.debug("Preloading STI type #{type}")