From 8fb0ec3c3ba03d94789a70ca68692911548e7aa9 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sat, 21 Sep 2019 14:14:28 +0000 Subject: [PATCH] code cleanup: rubocop: fix Style/RedundantConditional in app/helpers/issues_helper.rb git-svn-id: http://svn.redmine.org/redmine/trunk@18502 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- .rubocop_todo.yml | 1 - app/helpers/issues_helper.rb | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 411da95ab..4c3334f2e 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1504,7 +1504,6 @@ Style/RedundantConditional: Exclude: - 'app/controllers/workflows_controller.rb' - 'app/helpers/application_helper.rb' - - 'app/helpers/issues_helper.rb' - 'app/models/enumeration.rb' - 'lib/redmine/field_format.rb' diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index 45ce59a52..10c179550 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -370,7 +370,7 @@ module IssuesHelper # Returns the textual representation of a journal details # as an array of strings def details_to_strings(details, no_html=false, options={}) - options[:only_path] = (options[:only_path] == false ? false : true) + options[:only_path] = !(options[:only_path] == false) strings = [] values_by_field = {} details.each do |detail|