mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix position of load hook so that Base has been defined and included Model before it runs
This commit is contained in:
parent
a8dcc0b18e
commit
a5fa310f40
2 changed files with 6 additions and 3 deletions
|
@ -331,3 +331,6 @@ module ActiveRecord #:nodoc:
|
|||
self.connection_handler = ConnectionAdapters::ConnectionHandler.new
|
||||
end
|
||||
end
|
||||
|
||||
require 'active_record/connection_adapters/abstract/connection_specification'
|
||||
ActiveSupport.run_load_hooks(:active_record, ActiveRecord::Model::DeprecationProxy)
|
||||
|
|
|
@ -81,7 +81,7 @@ module ActiveRecord
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
require 'active_record/connection_adapters/abstract/connection_specification'
|
||||
ActiveSupport.run_load_hooks(:active_record, ActiveRecord::Model::DeprecationProxy)
|
||||
# Load Base at this point, because the active_record load hook is run in that file.
|
||||
Base
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue