app/controllers/application_controller.rb
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
Prevent CSRF attacks by raising an exception.
For APIs, you may want to use :null_session instead.
Prevent CSRF attacks by raising an exception . For APIs you may want to use : null_session instead .
def require_instructor!
      unless current_user.is_instructor?
        redirect_to root_url, :alert => 'You must be an instructor to access this page.'
      end
    end
def require_instructor! unless current_user . is_instructor? redirect_to root_url , :alert => 'You must be an instructor to access this page.' end end
Prevent CSRF attacks by raising an exception.
Prevent CSRF attacks by raising an exception .