0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-22 09:20:29 +01:00

FIX: changed wizard id resolution logic

Dieser Commit ist enthalten in:
Faizaan Gagan 2021-05-18 16:10:43 +05:30
Ursprung 04f008575f
Commit db72617b61

Datei anzeigen

@ -4,7 +4,8 @@ module ExtraLocalesControllerCustomWizard
super || begin super || begin
return false unless bundle =~ /wizard/ && request.referer =~ /\/w\// return false unless bundle =~ /wizard/ && request.referer =~ /\/w\//
path = URI(request.referer).path path = URI(request.referer).path
wizard_id = path.split('/w/').last wizard_path = path.split('/w/').last
wizard_id = wizard_path.split('/').first
CustomWizard::Template.exists?(wizard_id.underscore) CustomWizard::Template.exists?(wizard_id.underscore)
end end
end end