提交 a5fa310f 编写于 作者: J Jon Leighton

Fix position of load hook so that Base has been defined and included Model before it runs

上级 a8dcc0b1
......@@ -331,3 +331,6 @@ class Base
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 @@ def method_missing(name, *args, &block)
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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册