0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-13 21:42:53 +01:00
discourse-custom-wizard/extensions/invites_controller.rb
2021-03-11 12:00:15 +05:30

19 Zeilen
456 B
Ruby

# frozen_string_literal: true
module InvitesControllerCustomWizard
def path(url)
if ::Wizard.user_requires_completion?(@user)
wizard_id = @user.custom_fields['redirect_to_wizard']
if wizard_id && url != '/'
CustomWizard::Wizard.set_submission_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