summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2019-10-19 13:32:37 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2019-10-19 13:32:37 +0000
commit0365bd552e787fc4c351c7a54375a01378cbd0c1 (patch)
tree30717eedb9da4a33a14c119fa06dfc46f4686b57
parentadff3bcb7e6a2da835d0f1b43850077c6bc344b5 (diff)
downloadredmine-0365bd552e787fc4c351c7a54375a01378cbd0c1.tar.gz
redmine-0365bd552e787fc4c351c7a54375a01378cbd0c1.zip
code cleanup: rubocop: fix Style/ParenthesesAroundCondition in app/controllers/context_menus_controller.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18774 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--.rubocop_todo.yml1
-rw-r--r--app/controllers/context_menus_controller.rb4
2 files changed, 2 insertions, 3 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index 8c153bdc8..a782c472c 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -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'
diff --git a/app/controllers/context_menus_controller.rb b/app/controllers/context_menus_controller.rb
index 21c61f975..8622d15da 100644
--- a/app/controllers/context_menus_controller.rb
+++ b/app/controllers/context_menus_controller.rb
@@ -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