From e8c82b5d8f51ef6078414cecc3f449c0453c1d2c Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Wed, 25 Dec 2019 09:21:57 +0100 Subject: [PATCH] removes redundant constantize call [skip ci] The following loop constantizes after logging. --- guides/source/autoloading_and_reloading_constants.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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}")