debian-mirror-gitlab/lib/gem_extensions/active_record/associations/has_one_through_association.rb
2021-10-27 15:23:28 +05:30

18 lines
302 B
Ruby

# frozen_string_literal: true
module GemExtensions
module ActiveRecord
module Associations
module HasOneThroughAssociation
extend ActiveSupport::Concern
def find_target
return scope.first if disable_joins
super
end
end
end
end
end