aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2018-09-25 14:58:39 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2018-09-25 14:58:39 -0700
commit338c3c45fa4018e695453ccd3d73c4c9362fc007 (patch)
treeb7ae38fe67462a49bbd5bc4bbe417ec2a3bbd01d /railties
parent8dc784292b67b842e437632a4ff883572ff97a3e (diff)
downloadrails-338c3c45fa4018e695453ccd3d73c4c9362fc007.tar.gz
rails-338c3c45fa4018e695453ccd3d73c4c9362fc007.tar.bz2
rails-338c3c45fa4018e695453ccd3d73c4c9362fc007.zip
Allow helpers to be deferred until the routes have been finalized
ActiveStorage::BaseController subclasses ActionController::Base. ActionController::Base has an "inherited" hook set that includes the routing helpers to any subclass of AC::Base. Since ActiveStorage::BaseController is a subclass of AC::Base, it will get routing helpers included automatically. Unfortunately, when the framework is eagerly loaded, ActiveStorage::BaseController is loaded *before* the applications routes are loaded which means it attempts to include an "in flight" module so it gets an exception. This commit allows a class that's interested in being extended with routing helpers register itself such that when the routes are finalized, it will get the helpers included. If the routes are already finalized, then the helpers get included immediately.
Diffstat (limited to 'railties')
0 files changed, 0 insertions, 0 deletions