diff --git a/config/initializers/10-patches.rb b/config/initializers/10-patches.rb index c2d0a5fad..52e26a25b 100644 --- a/config/initializers/10-patches.rb +++ b/config/initializers/10-patches.rb @@ -13,7 +13,11 @@ module ActiveRecord # Undefines private Kernel#open method to allow using `open` scopes in models. # See Defect #11545 (http://www.redmine.org/issues/11545) for details. - class Base ; undef open ; end + class Base + class << self + undef open + end + end class Relation ; undef open ; end end