25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 
 

13 satır
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