diff options
author | Gareth Rees <gareth@mysociety.org> | 2014-06-03 11:19:21 +0100 |
---|---|---|
committer | Gareth Rees <gareth@mysociety.org> | 2014-06-04 09:48:13 +0100 |
commit | fee5d9384862af086613c4f09e0fd96f7bd347b8 (patch) | |
tree | 6233dd8512841604cdfb586c8fae0b1bb938f8ae /app/helpers/link_to_helper.rb | |
parent | 2b39b1f0cc5a04247abc938dda551e78c5f5cf9e (diff) |
Add cache-busting to request response notification
Users get a new response email, click the link, but get a cached page.
This is a quick fix to ensure they always see the response when clicking
the link.
Diffstat (limited to 'app/helpers/link_to_helper.rb')
-rwxr-xr-x | app/helpers/link_to_helper.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/helpers/link_to_helper.rb b/app/helpers/link_to_helper.rb index dd6ffa805..9f63ec583 100755 --- a/app/helpers/link_to_helper.rb +++ b/app/helpers/link_to_helper.rb @@ -28,7 +28,9 @@ module LinkToHelper # Incoming / outgoing messages def incoming_message_url(incoming_message, options = {}) - return request_url(incoming_message.info_request, options.merge(:anchor => "incoming-#{incoming_message.id}")) + default_options = { :anchor => "incoming-#{ incoming_message.id }", + :nocache => "incoming-#{ incoming_message.id }" } + request_url(incoming_message.info_request, options.merge(default_options)) end def incoming_message_path(incoming_message) @@ -36,7 +38,9 @@ module LinkToHelper end def outgoing_message_url(outgoing_message, options = {}) - request_url(outgoing_message.info_request, options.merge(:anchor => "outgoing-#{outgoing_message.id}")) + default_options = { :anchor => "outgoing-#{ outgoing_message.id }", + :nocache => "outgoing-#{ outgoing_message.id }" } + request_url(outgoing_message.info_request, options.merge(default_options)) end def outgoing_message_path(outgoing_message) |