您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 

13 行
253 B

  1. class ApplicationController < ActionController::Base
  2. protect_from_forgery with: :exception
  3. before_action :authorize
  4. protected
  5. def authorize
  6. unless User.find_by(id: session[:user_id])
  7. redirect_to login_url
  8. end
  9. end
  10. end