From eadc080e9c86c83dbcd517fb3089a62e993cf1c4 Mon Sep 17 00:00:00 2001 From: Louise Crow Date: Mon, 1 Sep 2014 10:29:12 +0100 Subject: Use path relative to Rails root. --- app/models/info_request.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/models/info_request.rb') diff --git a/app/models/info_request.rb b/app/models/info_request.rb index 121724424..a99cadc77 100644 --- a/app/models/info_request.rb +++ b/app/models/info_request.rb @@ -1052,7 +1052,7 @@ public # return stub path so admin can expire it first_three_digits = id.to_s()[0..2] path = "views/request/#{first_three_digits}/#{id}" - foi_cache_path = File.expand_path(File.join(File.dirname(__FILE__), '../../cache')) + foi_cache_path = File.expand_path(File.join(Rails.root, 'cache')) return File.join(foi_cache_path, path) end -- cgit v1.2.3