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)
|
2019-12-05 09:05:21 +01:00
|
|
|
wizard_id = @user.custom_fields['custom_wizard_redirect']
|
|
|
|
|
|
|
|
if wizard_id && url != '/'
|
|
|
|
CustomWizard::Wizard.set_submission_redirect(@user, wizard_id, url)
|
|
|
|
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
|
|
|
|
end
|