您最多选择25个主题
主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
|
- class ApplicationController < ActionController::Base
- protect_from_forgery with: :exception
-
- before_action :authorize
-
- protected
- def authorize
- unless User.find_by(id: session[:user_id])
- redirect_to login_url
- end
- end
- end
|