diff options
author | Xavier Noria <fxn@hashref.com> | 2019-07-13 00:13:57 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2019-07-13 00:14:57 +0200 |
commit | a8dfec903bd8cd3b7df9f9d5fbb7100520049302 (patch) | |
tree | 06ab38789da7b4da2b015dd71473f51058df8a87 /guides | |
parent | dd110e472024643452383f4195b1919f5aa7b249 (diff) | |
download | rails-a8dfec903bd8cd3b7df9f9d5fbb7100520049302.tar.gz rails-a8dfec903bd8cd3b7df9f9d5fbb7100520049302.tar.bz2 rails-a8dfec903bd8cd3b7df9f9d5fbb7100520049302.zip |
let the upgrading guide point to the autoloading guide for STIs [skip ci]
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/upgrading_ruby_on_rails.md | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/guides/source/upgrading_ruby_on_rails.md b/guides/source/upgrading_ruby_on_rails.md index 5e40f47df5..f17955e022 100644 --- a/guides/source/upgrading_ruby_on_rails.md +++ b/guides/source/upgrading_ruby_on_rails.md @@ -198,20 +198,7 @@ All is good! All known use cases of `require_dependency` have been eliminated, you should grep the project and delete them. -In the case of STIs with a hierarchy of more than two levels, you can preload the leaves of the hierarchy in an initializer: - -```ruby -# config/initializers/preload_stis.rb - -# By preloading leaves, the hierarchy is loaded upwards following -# the references to superclasses in the class definitions. -sti_leaves = %w( - app/models/leaf1.rb - app/models/leaf2.rb - app/models/leaf3.rb -) -Rails.autoloaders.main.preload(sti_leaves) -``` +If your application has STIs, please check their section in the guide [Autoloading and Reloading Constants (Zeitwerk Mode)](autoloading_and_reloading_constants.html#single-table-inheritance). #### Qualified names in class and module definitions |