Skip to content

Commit 732a474

Browse files
authored
Merge pull request rails#47974 from adrianna-chang-shopify/ac-trilogy-discard
Use Trilogy#discard! when discard! called on TrilogyAdapter
2 parents 7239ec1 + 43f03ea commit 732a474

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

activerecord/lib/active_record/connection_adapters/trilogy_adapter.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,11 @@ def disconnect!
207207
end
208208

209209
def discard!
210-
self.connection = nil
210+
super
211+
unless connection.nil?
212+
connection.discard!
213+
self.connection = nil
214+
end
211215
end
212216

213217
def each_hash(result)

0 commit comments

Comments
 (0)