summaryrefslogtreecommitdiffstats
path: root/lib/redmine/menu_manager.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2010-11-14 16:24:21 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2010-11-14 16:24:21 +0000
commit2ee45e8cac909991ddf782a8d2947ae99473404a (patch)
tree48456af96778489fcc65f77c347140adf206d66a /lib/redmine/menu_manager.rb
parentc4a218358f499b6252874b8260ffa475fd7be3d7 (diff)
downloadredmine-2ee45e8cac909991ddf782a8d2947ae99473404a.tar.gz
redmine-2ee45e8cac909991ddf782a8d2947ae99473404a.zip
Use Object#tap instead of #returning (#6887).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4406 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/menu_manager.rb')
-rw-r--r--lib/redmine/menu_manager.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/redmine/menu_manager.rb b/lib/redmine/menu_manager.rb
index 4094a9c14..996b1c5b4 100644
--- a/lib/redmine/menu_manager.rb
+++ b/lib/redmine/menu_manager.rb
@@ -192,13 +192,13 @@ module Redmine
def render_menu_node_with_children(node, project=nil)
caption, url, selected = extract_node_details(node, project)
- html = returning [] do |html|
+ html = [].tap do |html|
html << '<li>'
# Parent
html << render_single_menu_node(node, caption, url, selected)
# Standard children
- standard_children_list = returning "" do |child_html|
+ standard_children_list = "".tap do |child_html|
node.children.each do |child|
child_html << render_menu_node(child, project)
end
@@ -219,7 +219,7 @@ module Redmine
def render_unattached_children_menu(node, project)
return nil unless node.child_menus
- returning "" do |child_html|
+ "".tap do |child_html|
unattached_children = node.child_menus.call(project)
# Tree nodes support #each so we need to do object detection
if unattached_children.is_a? Array