diff options
author | Matthew Landauer <matthew@openaustralia.org> | 2012-09-24 17:51:56 +1000 |
---|---|---|
committer | Matthew Landauer <matthew@openaustralia.org> | 2012-09-24 17:51:56 +1000 |
commit | 5961a0e4152ac6a3d39832699e78580975961feb (patch) | |
tree | 020287a8ef91e17c028387e9ca1a4034432f6589 | |
parent | a9e41c56e1a44b78a48a0febc2124c3edd0e4c7b (diff) |
Make HolidayController#due_date use configuration REPLY_LATE_AFTER_DAYS
-rw-r--r-- | app/controllers/holiday_controller.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/holiday_controller.rb b/app/controllers/holiday_controller.rb index 1f81830f9..3a37b8d32 100644 --- a/app/controllers/holiday_controller.rb +++ b/app/controllers/holiday_controller.rb @@ -14,7 +14,8 @@ class HolidayController < ApplicationController def due_date if params[:holiday] @request_date = Date.strptime(params[:holiday]) or raise "Invalid date" - @due_date = Holiday.due_date_from_working_days(@request_date, 20) + days_later = MySociety::Config.get('REPLY_LATE_AFTER_DAYS', 20) + @due_date = Holiday.due_date_from_working_days(@request_date, days_later) @skipped = Holiday.all( :conditions => [ 'day >= ? AND day <= ?', @request_date.strftime("%F"), @due_date.strftime("%F") |