Skip to content

Commit 013906d

Browse files
Copilotdjezzzl
andcommitted
Fix ar_lazy_preload loader patch to use renamed @loaded_by_identity instance variable
Co-authored-by: djezzzl <9407725+djezzzl@users.noreply.github.com>
1 parent 2829bc4 commit 013906d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/n1_loader/ar_lazy_preload/loader_patch.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ module LoaderPatch
77
attr_accessor :context_setup
88

99
def loaded
10-
return @loaded if @already_loaded && @already_context
10+
return @loaded_by_identity if @already_loaded && @already_context
1111

1212
super
1313

1414
synchronize do
15-
context_setup&.call(@loaded.values.flatten) unless @already_context
15+
context_setup&.call(@loaded_by_identity.values.flatten) unless @already_context
1616
end
1717

1818
@already_context = true
19-
@loaded
19+
@loaded_by_identity
2020
end
2121
end
2222
end

0 commit comments

Comments
 (0)