1
0
Fork 0
discourse-custom-wizard-unl.../extensions/invites_controller.rb
2020-04-30 10:54:30 +10:00

18 Zeilen
Kein EOL
429 B
Ruby

module InvitesControllerCustomWizard
def path(url)
if ::Wizard.user_requires_completion?(@user)
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
super
end
private def post_process_invite(user)
super
@user = user
end
end