0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-22 17:30:29 +01:00
discourse-custom-wizard/extensions/invites_controller.rb
Angus McLeod 5e5b5e67ee
FIX: Cache valid directs and only allow one type in a template (#176)
* Cache valid directs and only allow one type in a template

* Add spec

* Bump version

* Bump version

* Exclude current wizard from other_after_signup
2022-01-31 14:48:04 +05:30

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