aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Landauer <matthew@openaustralia.org>2013-01-29 17:32:32 +1100
committerMatthew Landauer <matthew@openaustralia.org>2013-01-29 17:32:32 +1100
commit2170a716b02baf65c1470ffc7d85056767a86364 (patch)
tree7cc54120c839965c34f37f4cc8807e3c084f10c0
parent38995d22c85065d871299a39fd412bfb36438cf0 (diff)
render_for_text doesn't exist anymore. Replace with render :text
-rw-r--r--app/controllers/request_controller.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb
index 6106d68da..c18a97443 100644
--- a/app/controllers/request_controller.rb
+++ b/app/controllers/request_controller.rb
@@ -710,9 +710,8 @@ class RequestController < ApplicationController
if foi_fragment_cache_exists?(key_path)
logger.info("Reading cache for #{key_path}")
raise PermissionDenied.new("Directory listing not allowed") if File.directory?(key_path)
- cached = foi_fragment_cache_read(key_path)
- response.content_type = AlaveteliFileTypes.filename_to_mimetype(params[:file_name].join("/")) || 'application/octet-stream'
- render_for_text(cached)
+ render :text => foi_fragment_cache_read(key_path),
+ :content_type => (AlaveteliFileTypes.filename_to_mimetype(params[:file_name].join("/")) || 'application/octet-stream')
return
end