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 ...@@ -15,7 +15,7 @@ module GemExtensions
def scope def scope
if disable_joins if disable_joins
DisableJoins::Associations::AssociationScope.create.scope(self) ::GemExtensions::ActiveRecord::DisableJoins::Associations::AssociationScope.create.scope(self)
else else
super super
end end
...@@ -25,7 +25,7 @@ module GemExtensions ...@@ -25,7 +25,7 @@ module GemExtensions
if klass if klass
@association_scope ||= begin # rubocop:disable Gitlab/ModuleWithInstanceVariables @association_scope ||= begin # rubocop:disable Gitlab/ModuleWithInstanceVariables
if disable_joins if disable_joins
DisableJoins::Associations::AssociationScope.scope(self) ::GemExtensions::ActiveRecord::DisableJoins::Associations::AssociationScope.scope(self)
else else
super super
end end
......
...@@ -64,7 +64,7 @@ module GemExtensions ...@@ -64,7 +64,7 @@ module GemExtensions
end end
if scope.order_values.empty? && ordered 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.where_clause += scope.where_clause
split_scope split_scope
else 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