From: Toshi MARUYAMA Date: Tue, 22 Oct 2019 15:55:11 +0000 (+0000) Subject: code cleanup: rubocop: fix Style/ParenthesesAroundCondition in lib/redmine/helpers... X-Git-Tag: 4.1.0~266 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=05ef7738975647b061000c78b62097f104f8e464;p=redmine.git code cleanup: rubocop: fix Style/ParenthesesAroundCondition in lib/redmine/helpers/gantt.rb git-svn-id: http://svn.redmine.org/redmine/trunk@18837 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index c9b921590..48448284f 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1144,7 +1144,6 @@ Style/ParallelAssignment: Style/ParenthesesAroundCondition: Exclude: - 'app/models/repository/subversion.rb' - - 'lib/redmine/helpers/gantt.rb' - 'lib/redmine/scm/adapters/cvs_adapter.rb' - 'lib/redmine/scm/adapters/git_adapter.rb' diff --git a/lib/redmine/helpers/gantt.rb b/lib/redmine/helpers/gantt.rb index db0676ba7..1876e8dca 100644 --- a/lib/redmine/helpers/gantt.rb +++ b/lib/redmine/helpers/gantt.rb @@ -71,8 +71,9 @@ module Redmine months = (options[:months] || User.current.pref[:gantt_months]).to_i @months = (months > 0 && months < Setting.gantt_months_limit.to_i + 1) ? months : 6 # Save gantt parameters as user preference (zoom and months count) - if (User.current.logged? && (@zoom != User.current.pref[:gantt_zoom] || - @months != User.current.pref[:gantt_months])) + if User.current.logged? && + (@zoom != User.current.pref[:gantt_zoom] || + @months != User.current.pref[:gantt_months]) User.current.pref[:gantt_zoom], User.current.pref[:gantt_months] = @zoom, @months User.current.preference.save end