From: Toshi MARUYAMA Date: Tue, 22 Oct 2019 13:43:40 +0000 (+0000) Subject: code cleanup: rubocop: fix Style/ParenthesesAroundCondition in app/helpers/applicatio... X-Git-Tag: 4.1.0~281 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8d429120ecd8fe21dc7e50848952cb478c37f36c;p=redmine.git code cleanup: rubocop: fix Style/ParenthesesAroundCondition in app/helpers/application_helper.rb git-svn-id: http://svn.redmine.org/redmine/trunk@18822 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 24d070e6d..67d49f534 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1161,7 +1161,6 @@ Style/ParallelAssignment: # Configuration parameters: AllowSafeAssignment, AllowInMultilineConditions. Style/ParenthesesAroundCondition: Exclude: - - 'app/helpers/application_helper.rb' - 'app/models/project.rb' - 'app/models/query.rb' - 'app/models/repository/subversion.rb' diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 121de247f..02c876ee1 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -67,7 +67,7 @@ module ApplicationHelper def link_to_group(group, options={}) if group.is_a?(Group) name = h(group.name) - if (User.current.admin?) + if User.current.admin? only_path = options[:only_path].nil? ? true : options[:only_path] link_to name, edit_group_path(group, :only_path => only_path) else @@ -377,12 +377,12 @@ module ApplicationHelper projects.sort_by(&:lft).each do |project| # set the project environment to please macros. @project = project - if (ancestors.empty? || project.is_descendant_of?(ancestors.last)) + if ancestors.empty? || project.is_descendant_of?(ancestors.last) s << "\n" end