1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-27 02:41:15 +00:00

code cleanup: rubocop: fix Layout/CaseIndentation in lib/redmine/menu_manager.rb

git-svn-id: http://svn.redmine.org/redmine/trunk@18726 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2019-10-17 16:45:42 +00:00
parent 80f18dd89c
commit 5d77985f14
2 changed files with 11 additions and 11 deletions

View File

@ -70,7 +70,6 @@ Layout/CaseIndentation:
- 'app/models/issue_query.rb'
- 'config/initializers/10-patches.rb'
- 'lib/redmine/helpers/gantt.rb'
- 'lib/redmine/menu_manager.rb'
# Cop supports --auto-correct.
Layout/ClosingHeredocIndentation:

View File

@ -207,18 +207,19 @@ module Redmine
def extract_node_details(node, project=nil)
item = node
url = case item.url
when Hash
project.nil? ? item.url : {item.param => project}.merge(item.url)
when Symbol
if project
send(item.url, project)
url =
case item.url
when Hash
project.nil? ? item.url : {item.param => project}.merge(item.url)
when Symbol
if project
send(item.url, project)
else
send(item.url)
end
else
send(item.url)
item.url
end
else
item.url
end
caption = item.caption(project)
return [caption, url, (current_menu_item == item.name)]
end