forked from rails/rails
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create an :active_record_connection_adapters load hook which is run a…
…fter ActiveRecord::ConnectionAdapters is defined. Since callbacks defined with :active_record my establish a connection (such as "active_record.initialize_database" in the active record railtie) it can create order dependence since the adapters need to be registered first or else establishing a connection will raise an exception. So, let's define a new load hook that can be used for registering adapters, and run it as soon as ActiveRecord::ConnectionAdapters is defined, before the :active_record hooks are run.
- Loading branch information
1 parent
0ad26f7
commit b194c77
Showing
3 changed files
with
9 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters