Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wait to load PgSearch::Document until after ActiveRecord has loaded
Loading the PgSearch::Document model without waiting for ActiveRecord to load can cause problems because it causes ActiveRecord to pull configuration into ActiveRecord::Base before the initializers get loaded. This means ActiveRecord::Base could accidentally have inaccurate configuration. The fix for this is to wait until ActiveRecord has fully loaded before requiring the model. ref: rails/rails#23589
- Loading branch information