Skip to content

Commit 5ba4c8e

Browse files
committed
ensure that Association#with_each_shard doesn't use loaded results
Change-Id: Id36a367ea5f135f87e548c64afe8b0c640b6acfc Reviewed-on: https://gerrit.instructure.com/31443 Tested-by: Jenkins <jenkins@instructure.com> Reviewed-by: Anthus Williams <awilliams@instructure.com> Product-Review: Cody Cutrer <cody@instructure.com> QA-Review: Cody Cutrer <cody@instructure.com>
1 parent 5631eb4 commit 5ba4c8e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/stubs/shard.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def shard
125125
%w{HasManyAssociation HasManyThroughAssociation}.each do |klass|
126126
const_get(klass).class_eval do
127127
def with_each_shard(*shards)
128-
scope = self
128+
scope = self.scoped
129129
scope = yield(scope) if block_given?
130130
Array(scope)
131131
end

0 commit comments

Comments
 (0)