]> source.dussan.org Git - redmine.git/commitdiff
code cleanup: rubocop: fix Layout/CaseIndentation in lib/redmine/menu_manager.rb
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 17 Oct 2019 16:45:42 +0000 (16:45 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 17 Oct 2019 16:45:42 +0000 (16:45 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@18726 e93f8b46-1217-0410-a6f0-8f06a7374b81

.rubocop_todo.yml
lib/redmine/menu_manager.rb

index 80ad5fb7bc2cde5e0cf84370ab655bc6a974ca9a..30201274a90f7f4a3e71ca7d2b3a079848192133 100644 (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:
index eb40141c1fd1617f66b0ae685ae1395d070274d0..708c59678c87a823b0ecc48f2c52ba77c9f73772 100644 (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