1
0
Fork 0
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:
Jon Leighton 2011-12-24 12:30:10 +00:00
parent a8dcc0b18e
commit a5fa310f40
2 changed files with 6 additions and 3 deletions

View file

@ -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)

View file

@ -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