Mastodon by Werefox Software source code
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.

sessions_controller.rb 439B

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