File Upload Fixes

Dunno why this was buggered again. ":back" doesn't seem to function as it used to.
Also, when uploading a file from page "foo", it's important to return to "foo" after
a successful upload, rather than redirecting to the HomePage.

Finally, a favicon tweak.
This commit is contained in:
Jacques Distler 2009-02-18 01:40:11 -06:00
parent d7c445178b
commit 7f2b16e78d
5 changed files with 9 additions and 11 deletions

View file

@ -18,7 +18,7 @@ class FileController < ApplicationController
new_file = @web.wiki_files.create(params['file'])
if new_file.valid?
flash[:info] = "File '#{@file_name}' successfully uploaded"
redirect_to_page(@page_name)
redirect_to(params['referring_page'])
else
# pass the file with errors back into the form
@file = new_file