More of the Same.

This commit is contained in:
Jacques Distler 2007-12-30 03:58:57 -06:00
parent df28bd545a
commit a2c7705de5
4 changed files with 54 additions and 6 deletions

View file

@ -14,7 +14,7 @@ class FileController < ApplicationController
if params['file']
unless (request.post? || ENV["RAILS_ENV"] == "test")
headers['Allow'] = 'POST'
render(:status => 405, :text => 'You must use an HTTP POST')
render(:status => 405, :text => 'You must use an HTTP POST', :layout => 'error')
return
end
# form supplied
@ -63,7 +63,7 @@ class FileController < ApplicationController
protected
def check_allow_uploads
render(:status => 404, :text => "Web #{params['web'].inspect} not found") and return false unless @web
render(:status => 404, :text => "Web #{params['web'].inspect} not found", :layout => 'error') and return false unless @web
if @web.allow_uploads?
return true
else