aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/holiday_controller.rb
diff options
context:
space:
mode:
authorMatthew Landauer <matthew@openaustralia.org>2012-09-25 08:55:35 +1000
committerMatthew Landauer <matthew@openaustralia.org>2012-09-25 08:55:35 +1000
commitf59700138f7360436767fddea554c739e2cd484b (patch)
tree8c3af52f3f1f369ab412fa7571f19860e4f260b8 /app/controllers/holiday_controller.rb
parent265e336ae0608af39aa3aad8b27862e572222562 (diff)
Extract configuration with defaults into one module
Diffstat (limited to 'app/controllers/holiday_controller.rb')
-rw-r--r--app/controllers/holiday_controller.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/app/controllers/holiday_controller.rb b/app/controllers/holiday_controller.rb
index 9430c0756..82fa2852e 100644
--- a/app/controllers/holiday_controller.rb
+++ b/app/controllers/holiday_controller.rb
@@ -14,9 +14,7 @@ class HolidayController < ApplicationController
def due_date
if params[:holiday]
@request_date = Date.strptime(params[:holiday]) or raise "Invalid date"
- days_later = MySociety::Config.get('REPLY_LATE_AFTER_DAYS', 20)
- working_or_calendar_days = MySociety::Config.get('WORKING_OR_CALENDAR_DAYS', 'working')
- @due_date = Holiday.due_date_from(@request_date, days_later, working_or_calendar_days)
+ @due_date = Holiday.due_date_from(@request_date, Configuration::reply_late_after_days, Configuration::working_or_calendar_days)
@skipped = Holiday.all(
:conditions => [ 'day >= ? AND day <= ?',
@request_date.strftime("%F"), @due_date.strftime("%F")