Move Files When Renaming Web

Renaming a web should move the
corresponding subdirectory of webs/ .
Otherwise, links to uploaded files break.
This commit is contained in:
Jacques Distler 2009-12-26 23:43:18 -06:00
parent a705709f9a
commit 601331b508
4 changed files with 31 additions and 6 deletions

View file

@ -24,7 +24,7 @@ class FileControllerTest < ActionController::TestCase
@wiki = Wiki.new
WikiFile.delete_all
require 'fileutils'
FileUtils.rm_rf("#{RAILS_ROOT}/webs/wiki1/files")
FileUtils.rm_rf("#{RAILS_ROOT}/webs/wiki1")
end
def test_file_upload_form