aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Landauer <matthew@openaustralia.org>2012-09-24 13:19:29 +1000
committerMatthew Landauer <matthew@openaustralia.org>2012-09-24 13:31:57 +1000
commit7df2900a1beae8ab73aae47f5956064b2dbd0e00 (patch)
tree1ba35d154b4fcfa858443976b9d20ce47b993043
parentc0b90c478a6fd17fd0e02e5dc5626d51aec21fdd (diff)
Make things a little more concise
-rw-r--r--app/models/holiday.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/app/models/holiday.rb b/app/models/holiday.rb
index 271fff3e1..237fe5757 100644
--- a/app/models/holiday.rb
+++ b/app/models/holiday.rb
@@ -52,12 +52,11 @@ class Holiday < ActiveRecord::Base
# Now step forward into each of the 20 days.
while days_passed < working_days
- response_required_by += 1.day
- next if weekend_or_holiday?(response_required_by)
- days_passed += 1
+ response_required_by += 1
+ days_passed += 1 unless weekend_or_holiday?(response_required_by)
end
- return response_required_by
+ response_required_by
end
end