explicitly tell to Rails not to render a layout for file download actions (it shouldn't matter, but...)

This commit is contained in:
Alexey Verkhovsky 2005-01-21 19:44:34 +00:00
parent 88d7dc832d
commit f84727c03e

View file

@ -4,7 +4,7 @@ require 'redcloth_for_tex'
class WikiController < ApplicationController class WikiController < ApplicationController
layout 'default', :except => [:rss_feed, :rss_with_headlines, :tex_web, :tex] layout 'default', :except => [:rss_feed, :rss_with_headlines, :tex, :export_tex, :export_html]
before_filter :pre_process before_filter :pre_process
def index def index
@ -317,7 +317,7 @@ class WikiController < ApplicationController
end end
FileUtils.rm_rf(Dir[WikiService.storage_path + file_prefix + '*.zip']) FileUtils.rm_rf(Dir[WikiService.storage_path + file_prefix + '*.zip'])
FileUtils.mv(tmp_path, file_path) FileUtils.mv(tmp_path, file_path)
send_file(file_path, :type => 'application/zip') send_file(file_path, :type => 'application/zip', :streaming => false)
end end
def export_web_to_tex(file_path) def export_web_to_tex(file_path)