gitlab-org--gitlab-foss/lib/gem_extensions/active_record/associations/has_many_through_associatio...

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
370 B
Ruby
Raw Normal View History

# frozen_string_literal: true
module GemExtensions
module ActiveRecord
module Associations
module HasManyThroughAssociation
extend ActiveSupport::Concern
def find_target
return [] unless target_reflection_has_associated_record?
return scope.to_a if disable_joins
super
end
end
end
end
end