debian-mirror-gitlab/config/initializers/active_record_preloader.rb

16 lines
296 B
Ruby
Raw Normal View History

2017-09-10 17:25:29 +05:30
module ActiveRecord
module Associations
class Preloader
module NoCommitPreloader
def preloader_for(reflection, owners, rhs_klass)
return NullPreloader if rhs_klass == ::Commit
super
end
end
prepend NoCommitPreloader
end
end
end