Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OHR Support
Manage
Activity
Members
Labels
Plan
Issues
97
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Projects
OHR Support
Commits
61e20cb2
Commit
61e20cb2
authored
14 years ago
by
Gregor Schmidt
Browse files
Options
Downloads
Patches
Plain Diff
Fixing monkey patching of rubytree to be more robust
parent
0caf4b3d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/redmine/menu_manager.rb
+8
-5
8 additions, 5 deletions
lib/redmine/menu_manager.rb
with
8 additions
and
5 deletions
lib/redmine/menu_manager.rb
+
8
−
5
View file @
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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment