Commit 85e1333e authored by Holger Just's avatar Holger Just

Merge remote-tracking branch 'schmidt/b/266-fix-monkey-patching-of-rubytree'

parents c8e584e8 61e20cb2
......@@ -23,12 +23,13 @@ module TreeNodePatch
base.class_eval do
attr_reader :last_items_count
alias :old_initilize :initialize
def initialize(name, content = nil)
old_initilize(name, content)
def initialize_with_redmine(name, content = nil)
extend InstanceMethods
@last_items_count = 0
extend(InstanceMethods)
initialize_without_redmine(name, content)
end
alias_method_chain :initialize, :redmine
end
end
......@@ -99,7 +100,9 @@ module TreeNodePatch
end
end
end
Tree::TreeNode.send(:include, TreeNodePatch)
unless Tree::TreeNode.included_modules.include?(TreeNodePatch)
Tree::TreeNode.send(:include, TreeNodePatch)
end
module Redmine
module MenuManager
......
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