lib/rage/ext/setup.rb in rage-rb-1.3.0 vs lib/rage/ext/setup.rb in rage-rb-1.4.0
- old
+ new
@@ -2,10 +2,10 @@
if defined?(ActiveSupport::IsolatedExecutionState)
ActiveSupport::IsolatedExecutionState.isolation_level = :fiber
end
# release ActiveRecord connections on yield
-if defined?(ActiveRecord)
+if defined?(ActiveRecord) && ActiveRecord.version < Gem::Version.create("7.1.0")
class Fiber
def self.defer
res = Fiber.yield
if ActiveRecord::Base.connection_pool.active_connection?