Du kan inte välja fler än 25 ämnen
Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
|
- 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
|