File uploads now work.

This commit is contained in:
Jacques Distler 2007-03-10 22:31:24 -06:00
parent 234d5d82f0
commit c704f899af
2 changed files with 1 additions and 2 deletions

View file

@ -29,7 +29,6 @@ class FileController < ApplicationController
send_data(file.content, determine_file_options_for(@file_name, :filename => @file_name))
else
@file = WikiFile.new(:file_name => @file_name)
# @file = WikiFile.new(@file_name)
render
end
end

View file

@ -16,7 +16,7 @@ ActionController::Routing::Routes.draw do |map|
map.connect 'web_list', :controller => 'wiki', :action => 'web_list'
connect_to_web map, ':web/edit_web', :controller => 'admin', :action => 'edit_web'
connect_to_web map, ':web/files/:id', :controller => 'file', :action => 'file'
connect_to_web map, ':web/files/:id', :controller => 'file', :action => 'file', :requirements => {:id => /[-._\w]+/}, :id => nil
connect_to_web map, ':web/import/:id', :controller => 'file', :action => 'import'
connect_to_web map, ':web/login', :controller => 'wiki', :action => 'login'
connect_to_web map, ':web/web_list', :controller => 'wiki', :action => 'web_list'