From 9242ad045deb10353d6c3ba9ca7071b0630bb4dd Mon Sep 17 00:00:00 2001 From: Alexey Verkhovsky Date: Fri, 21 Jan 2005 21:06:46 +0000 Subject: [PATCH] fixed the render_to_string hack to live peasefully with the new ActionPack rule that "the first render wins" --- app/controllers/wiki_controller.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/wiki_controller.rb b/app/controllers/wiki_controller.rb index f8355a41..609fde34 100755 --- a/app/controllers/wiki_controller.rb +++ b/app/controllers/wiki_controller.rb @@ -317,7 +317,7 @@ class WikiController < ApplicationController end FileUtils.rm_rf(Dir[WikiService.storage_path + file_prefix + '*.zip']) FileUtils.mv(tmp_path, file_path) - send_file(file_path, :type => 'application/zip', :streaming => false) + send_file(file_path, :type => 'application/zip') end def export_web_to_tex(file_path) @@ -399,11 +399,12 @@ class WikiController < ApplicationController def render_to_string(template_name) add_variables_to_assigns render template_name + @performed_render = false @template.render_file(template_name) end def template_engine(template_name) - ERB.new(IO.readlines(RAILS_ROOT + '/app/views/wiki/' + template_name + '.rhtml').join) + ERB.new(IO.readlines(RAILS_ROOT + '/app/views/' + template_name + '.rhtml').join) end def truncate(text, length = 30, truncate_string = '...')