diff --git a/lib/que/active_record/connection.rb b/lib/que/active_record/connection.rb index cf8dc83d..9935308e 100644 --- a/lib/que/active_record/connection.rb +++ b/lib/que/active_record/connection.rb @@ -9,7 +9,7 @@ class << self # Check out a PG::Connection object from ActiveRecord's pool. def checkout wrap_in_rails_executor do - ::ActiveRecord::Base.connection_pool.with_connection do |conn| + Que::ActiveRecord::Model.connection_pool.with_connection do |conn| yield conn.raw_connection end end