aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGareth Rees <gareth@mysociety.org>2014-03-12 10:34:12 +0000
committerGareth Rees <gareth@mysociety.org>2014-03-13 11:24:11 +0000
commit40f441c89ee97102b16b1784a2b1544a40a66734 (patch)
tree575269bf178e70395d76a1d5de0914de0a6a9b1f
parent27128cd0d9a4ae69c8f2cfadd52e0ab078acffec (diff)
Correctly call helpers in RequestController#describe_state
Calling simple_date threw an exception as it uses a helper internally. Only LinkToHelper is included in to the controller, so the underlying helper was not available.
-rw-r--r--app/controllers/request_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb
index a94461758..6445dd685 100644
--- a/app/controllers/request_controller.rb
+++ b/app/controllers/request_controller.rb
@@ -447,9 +447,9 @@ class RequestController < ApplicationController
flash[:notice] = case info_request.calculate_status
when 'waiting_response'
_("<p>Thank you! Hopefully your wait isn't too long.</p> <p>By law, you should get a response promptly, and normally before the end of <strong>
-{{date_response_required_by}}</strong>.</p>",:date_response_required_by=>simple_date(info_request.date_response_required_by))
+{{date_response_required_by}}</strong>.</p>",:date_response_required_by=>view_context.simple_date(info_request.date_response_required_by))
when 'waiting_response_overdue'
- _("<p>Thank you! Hope you don't have to wait much longer.</p> <p>By law, you should have got a response promptly, and normally before the end of <strong>{{date_response_required_by}}</strong>.</p>",:date_response_required_by=>simple_date(info_request.date_response_required_by))
+ _("<p>Thank you! Hope you don't have to wait much longer.</p> <p>By law, you should have got a response promptly, and normally before the end of <strong>{{date_response_required_by}}</strong>.</p>",:date_response_required_by=>view_context.simple_date(info_request.date_response_required_by))
when 'waiting_response_very_overdue'
_("<p>Thank you! Your request is long overdue, by more than {{very_late_number_of_days}} working days. Most requests should be answered within {{late_number_of_days}} working days. You might like to complain about this, see below.</p>", :very_late_number_of_days => AlaveteliConfiguration::reply_very_late_after_days, :late_number_of_days => AlaveteliConfiguration::reply_late_after_days)
when 'not_held'