2021-03-11 07:30:15 +01:00
|
|
|
# frozen_string_literal: true
|
2019-12-05 09:05:21 +01:00
|
|
|
module InvitesControllerCustomWizard
|
|
|
|
def path(url)
|
2020-04-19 08:06:18 +02:00
|
|
|
if ::Wizard.user_requires_completion?(@user)
|
2022-01-31 10:18:04 +01:00
|
|
|
wizard_id = @user.redirect_to_wizard
|
2019-12-05 09:05:21 +01:00
|
|
|
|
2024-10-16 13:52:03 +02:00
|
|
|
if wizard_id && url != "/"
|
2021-06-17 09:50:22 +02:00
|
|
|
CustomWizard::Wizard.set_wizard_redirect(@user, wizard_id, url)
|
2019-12-05 09:05:21 +01:00
|
|
|
url = "/w/#{wizard_id.dasherize}"
|
|
|
|
end
|
|
|
|
end
|
2020-04-30 02:54:30 +02:00
|
|
|
super
|
2019-12-05 09:05:21 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
private def post_process_invite(user)
|
2020-04-30 02:54:30 +02:00
|
|
|
super
|
2019-12-05 09:05:21 +01:00
|
|
|
@user = user
|
|
|
|
end
|
2021-03-11 07:30:15 +01:00
|
|
|
end
|