Corrigindo testes

This commit is contained in:
2008-03-05 03:44:39 -03:00
parent ca075b77be
commit f757e49b64
8 changed files with 20 additions and 68 deletions

View File

@@ -28,7 +28,13 @@ class ApplicationController < ActionController::Base
# Acesso negado
if exception.is_a?(AccessDenied)
respond_to do |format|
format.html { render :file => "#{RAILS_ROOT}/public/401.html", :status => 401 }
format.html {
if logged_in?
render :file => "#{RAILS_ROOT}/public/401.html", :status => 401
else
login_by_html
end
}
format.xml { head 401 }
end

View File

@@ -13,9 +13,9 @@
class CoursesController < ApplicationController
before_filter :find_course, :except => [ :index ]
before_filter :require_admin, :only => [ :new, :create, :edit, :update, :destroy ]
before_filter :require_login, :only => [ :enroll, :unenroll ]
before_filter :find_course, :except => [ :index ]
after_filter :cache_sweep, :only => [ :create, :update, :destroy ]
def index