Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
O
OHR Support
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
97
Issues
97
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
OHR Support
Commits
61e20cb2
Commit
61e20cb2
authored
Mar 07, 2011
by
Gregor Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing monkey patching of rubytree to be more robust
parent
0caf4b3d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
menu_manager.rb
lib/redmine/menu_manager.rb
+8
-5
No files found.
lib/redmine/menu_manager.rb
View file @
61e20cb2
...
@@ -23,12 +23,13 @@ module TreeNodePatch
...
@@ -23,12 +23,13 @@ module TreeNodePatch
base
.
class_eval
do
base
.
class_eval
do
attr_reader
:last_items_count
attr_reader
:last_items_count
alias
:old_initilize
:initialize
def
initialize_with_redmine
(
name
,
content
=
nil
)
def
initialize
(
name
,
content
=
nil
)
extend
InstanceMethods
old_initilize
(
name
,
content
)
@last_items_count
=
0
@last_items_count
=
0
extend
(
InstanceMethods
)
initialize_without_redmine
(
name
,
content
)
end
end
alias_method_chain
:initialize
,
:redmine
end
end
end
end
...
@@ -99,7 +100,9 @@ module TreeNodePatch
...
@@ -99,7 +100,9 @@ module TreeNodePatch
end
end
end
end
end
end
Tree
::
TreeNode
.
send
(
:include
,
TreeNodePatch
)
unless
Tree
::
TreeNode
.
included_modules
.
include?
(
TreeNodePatch
)
Tree
::
TreeNode
.
send
(
:include
,
TreeNodePatch
)
end
module
Redmine
module
Redmine
module
MenuManager
module
MenuManager
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment