Corrigindo testes
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user