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'
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