You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

13 rivejä
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