aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/application_controller.rb
diff options
context:
space:
mode:
authorFrancis Irving <francis@mysociety.org>2010-05-19 14:36:58 +0100
committerFrancis Irving <francis@mysociety.org>2010-05-19 14:36:58 +0100
commit76abcd06b6531e15846d126431fc0edbc705f760 (patch)
tree8e0555a69a0b858f6a6e07ae65ae8f58c62d3d7b /app/controllers/application_controller.rb
parent5dd5f82918466c4ade21d4fe26dfc776f5cdc874 (diff)
Cache doesn't require initial slash
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r--app/controllers/application_controller.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 064d8af3d..be555b291 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -260,6 +260,7 @@ class ApplicationController < ActionController::Base
path = url_for(param)
first_three_digits = param['id'].to_s()[0..2]
path = path.sub("/request/", "/request/" + first_three_digits + "/")
+ path = path.sub(/^\//, "") # remove initial slash
end
def foi_fragment_cache_all_for_request(info_request)
first_three_digits = info_request.id.to_s()[0..2]