diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2019-10-17 16:45:42 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2019-10-17 16:45:42 +0000 |
commit | 5d77985f14802cdb074a08d7d162e0c5d797b6c1 (patch) | |
tree | 7a0af0a758f8d90cd264b3a9edce80cd0859c2b6 | |
parent | 80f18dd89c8f8070aa9ff6e28d55d4518cbd61a6 (diff) | |
download | redmine-5d77985f14802cdb074a08d7d162e0c5d797b6c1.tar.gz redmine-5d77985f14802cdb074a08d7d162e0c5d797b6c1.zip |
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
-rw-r--r-- | .rubocop_todo.yml | 1 | ||||
-rw-r--r-- | lib/redmine/menu_manager.rb | 21 |
2 files changed, 11 insertions, 11 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 80ad5fb7b..30201274a 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -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: diff --git a/lib/redmine/menu_manager.rb b/lib/redmine/menu_manager.rb index eb40141c1..708c59678 100644 --- a/lib/redmine/menu_manager.rb +++ b/lib/redmine/menu_manager.rb @@ -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 |