Browse Source

If signed in, redirect autofollow invite to profile page (#7956)

Fix #7944
master
Eugen Rochko 6 years ago
committed by GitHub
parent
commit
baff4a7ce0
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 0 deletions
  1. +10
    -0
      app/controllers/auth/registrations_controller.rb

+ 10
- 0
app/controllers/auth/registrations_controller.rb View File

@ -39,6 +39,16 @@ class Auth::RegistrationsController < Devise::RegistrationsController
new_user_session_path
end
def after_sign_in_path_for(_resource)
set_invite
if @invite&.autofollow?
short_account_path(@invite.user.account)
else
super
end
end
def after_inactive_sign_up_path_for(_resource)
new_user_session_path
end

Loading…
Cancel
Save