lib/airbrake/rails/controller_methods.rb in airbrake-4.2.0 vs lib/airbrake/rails/controller_methods.rb in airbrake-4.2.1
- old
+ new
@@ -113,10 +113,10 @@
nil
end
ensure
# The Airbrake middleware is first in the chain, before ActiveRecord::ConnectionAdapters::ConnectionManagement
# kicks in to do its thing. This can cause the connection pool to run out of connections.
- if defined?(ActiveRecord) && ActiveRecord::Base.respond_to?(:connection_pool)
+ if defined?(ActiveRecord::Base) && ActiveRecord::Base.respond_to?(:connection_pool)
ActiveRecord::Base.connection_pool.release_connection
end
end
end
end