diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2018-09-25 14:58:39 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2018-09-25 14:58:39 -0700 |
commit | 338c3c45fa4018e695453ccd3d73c4c9362fc007 (patch) | |
tree | b7ae38fe67462a49bbd5bc4bbe417ec2a3bbd01d /actionpack/test/dispatch/uploaded_file_test.rb | |
parent | 8dc784292b67b842e437632a4ff883572ff97a3e (diff) | |
download | rails-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 'actionpack/test/dispatch/uploaded_file_test.rb')
0 files changed, 0 insertions, 0 deletions