1
0
Fork 0
discourse-custom-wizard-unl.../lib/custom_wizard/extensions/invites_controller.rb
2022-03-12 14:00:07 +01:00

19 Zeilen
435 B
Ruby

# frozen_string_literal: true
module InvitesControllerCustomWizard
def path(url)
if ::Wizard.user_requires_completion?(@user)
wizard_id = @user.redirect_to_wizard
if wizard_id && url != '/'
CustomWizard::Wizard.set_wizard_redirect(@user, wizard_id, url)
url = "/w/#{wizard_id.dasherize}"
end
end
super
end
private def post_process_invite(user)
super
@user = user
end
end