Commit dd74d415 authored by Peter Leitzen's avatar Peter Leitzen

Merge branch 'fix-disable-joins-autoloading' into 'master'

Fix autoloading of DisableJoins constants

See merge request gitlab-org/gitlab!70559
parents 95cd8700 d39093c3
......@@ -15,7 +15,7 @@ module GemExtensions
def scope
if disable_joins
DisableJoins::Associations::AssociationScope.create.scope(self)
::GemExtensions::ActiveRecord::DisableJoins::Associations::AssociationScope.create.scope(self)
else
super
end
......@@ -25,7 +25,7 @@ module GemExtensions
if klass
@association_scope ||= begin # rubocop:disable Gitlab/ModuleWithInstanceVariables
if disable_joins
DisableJoins::Associations::AssociationScope.scope(self)
::GemExtensions::ActiveRecord::DisableJoins::Associations::AssociationScope.scope(self)
else
super
end
......
......@@ -64,7 +64,7 @@ module GemExtensions
end
if scope.order_values.empty? && ordered
split_scope = DisableJoins::Relation.create(scope.klass, key, join_ids)
split_scope = ::GemExtensions::ActiveRecord::DisableJoins::Relation.create(scope.klass, key, join_ids)
split_scope.where_clause += scope.where_clause
split_scope
else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment