mirror of
https://github.com/meineerde/redmine.git
synced 2026-02-01 03:57:15 +00:00
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
This commit is contained in:
parent
5ac2471a7a
commit
05ef773897
@ -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'
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user