Applied rubocop.

This commit is contained in:
Martin Edenhofer 2015-09-11 10:46:53 +02:00
parent f0ed6718e8
commit ceff2cc36c
4 changed files with 7 additions and 9 deletions

View file

@ -210,7 +210,7 @@ returns
# check if min one is set to default true # check if min one is set to default true
def min_one_check def min_one_check
Calendar.all.each {|calendar| Calendar.all.each {|calendar|
return if calendar.default return true if calendar.default
} }
first = Calendar.order(:created_at, :id).limit(1).first first = Calendar.order(:created_at, :id).limit(1).first
first.default = true first.default = true

View file

@ -108,8 +108,8 @@ returns
self.update_time_escal_date = biz.time(pending_time, :minutes).after(update_time_escal_date) self.update_time_escal_date = biz.time(pending_time, :minutes).after(update_time_escal_date)
end end
end end
if (!self.escalation_time && self.update_time_escal_date) || self.update_time_escal_date < self.escalation_time if (!escalation_time && update_time_escal_date) || update_time_escal_date < escalation_time
self.escalation_time = self.update_time_escal_date self.escalation_time = update_time_escal_date
end end
# get update time in min # get update time in min
@ -136,10 +136,8 @@ returns
if close_time if close_time
self.close_time_in_min = pending_minutes(created_at, close_time, biz, 'business_minutes') self.close_time_in_min = pending_minutes(created_at, close_time, biz, 'business_minutes')
else else
if (!self.escalation_time && self.close_time_escal_date) || self.close_time_escal_date < self.escalation_time if (!escalation_time && close_time_escal_date) || close_time_escal_date < escalation_time
if !escalation_disabled self.escalation_time = close_time_escal_date
self.escalation_time = self.close_time_escal_date
end
end end
end end