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.
 
 
 
 
 

13 rader
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