]> source.dussan.org Git - redmine.git/commitdiff
Prevents "Overwriting existing method Issue.open" warning (#11545).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 17 Aug 2012 14:34:10 +0000 (14:34 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 17 Aug 2012 14:34:10 +0000 (14:34 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10208 e93f8b46-1217-0410-a6f0-8f06a7374b81

config/initializers/10-patches.rb

index c2d0a5fad560bf2d0f7e4ec61acd22e643086406..52e26a25b867614eaaec1b6caa8e2280b82376d4 100644 (file)
@@ -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