app/controllers/courses_controller.rb
# Confirms a teacher logged-in user.
Confirms a teacher logged-in user.
Confirms a teacher logged - in user .
def teacher_logged_in
    unless teacher_logged_in?
      return false
    end
  end
def teacher_logged_in unless teacher_logged_in? return false end end
Confirms a teacher logged-in user.
Confirms a teacher logged - in user .
#redirect_to root_url, flash: {danger: '老师请登陆'}