]> source.dussan.org Git - redmine.git/commitdiff
code cleanup: rubocop: fix Style/ParenthesesAroundCondition in app/controllers/contex...
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 19 Oct 2019 13:32:37 +0000 (13:32 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 19 Oct 2019 13:32:37 +0000 (13:32 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@18774 e93f8b46-1217-0410-a6f0-8f06a7374b81

.rubocop_todo.yml
app/controllers/context_menus_controller.rb

index 8c153bdc8e5294f9130e85354d5f93b616da3eaf..a782c472c690405eee1c3a3e474d1c5ecbfcc634 100644 (file)
@@ -1187,7 +1187,6 @@ Style/ParallelAssignment:
 # Configuration parameters: AllowSafeAssignment, AllowInMultilineConditions.
 Style/ParenthesesAroundCondition:
   Exclude:
-    - 'app/controllers/context_menus_controller.rb'
     - 'app/helpers/application_helper.rb'
     - 'app/models/project.rb'
     - 'app/models/query.rb'
index 21c61f9754a94aa606cbf49d9916e132b69b303e..8622d15daf3cd3db9c65b251080ce4b5c7275465 100644 (file)
@@ -24,7 +24,7 @@ class ContextMenusController < ApplicationController
   before_action :find_issues, :only => :issues
 
   def issues
-    if (@issues.size == 1)
+    if @issues.size == 1
       @issue = @issues.first
     end
     @issue_ids = @issues.map(&:id).sort
@@ -68,7 +68,7 @@ class ContextMenusController < ApplicationController
       preload(:user).to_a
 
     (render_404; return) unless @time_entries.present?
-    if (@time_entries.size == 1)
+    if @time_entries.size == 1
       @time_entry = @time_entries.first
     end