Looking for changes on website content https://projet-alice-demo.herokuapp.com/diffs/
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.

15 lines
285B

  1. class ApplicationController < ActionController::Base
  2. protect_from_forgery with: :exception
  3. def authenticated?
  4. session[:authenticated] == true
  5. end
  6. def must_be_authenticated
  7. unless authenticated?
  8. session[:redirect_to] = request.path
  9. redirect_to login_path
  10. end
  11. end
  12. end