Commit 01eeecf3 authored by Stan Hu's avatar Stan Hu

Merge branch 'cherry-pick-841e0c1d' into 'master'

Fix Prependable module for Rails 6.1

See merge request gitlab-org/gitlab!60810
parents a7fbff6d 59118a90
......@@ -21,7 +21,12 @@ module Gitlab
def prepend_features(base)
return false if prepended?(base)
super
# Rails 6.1 allows prepending of the modules, but it doesn't
# work well when both modules extend ActiveSupport::Concern
# https://github.com/rails/rails/pull/42067
#
# Let's keep our own implementation, until the issue is fixed
Module.instance_method(:prepend_features).bind(self).call(base)
if const_defined?(:ClassMethods)
klass_methods = const_get(:ClassMethods, false)
......
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