This method is only available on newer versions. The first available version (v7.2.3) is shown here.
active_connection()
Alias for ActiveRecord::ConnectionAdapters::ConnectionPool#active_connection?