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.

23 lines
408 B

  1. class Auth::SessionsController < Devise::SessionsController
  2. include Devise::Controllers::Rememberable
  3. layout 'auth'
  4. def create
  5. super do |resource|
  6. remember_me(resource)
  7. end
  8. end
  9. protected
  10. def after_sign_in_path_for(_resource)
  11. last_url = stored_location_for(:user)
  12. if [about_path].include?(last_url)
  13. root_path
  14. else
  15. last_url || root_path
  16. end
  17. end
  18. end