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/lib/custom_wizard/extensions/extra_locales_controller.rb

15 Zeilen
470 B
Ruby

2021-03-11 07:30:15 +01:00
# frozen_string_literal: true
module ExtraLocalesControllerCustomWizard
private def valid_bundle?(bundle)
2024-10-16 13:52:03 +02:00
super ||
begin
return false unless bundle =~ /wizard/ && request.referer =~ %r{/w/}
path = URI(request.referer).path
wizard_path = path.split("/w/").last
wizard_id = wizard_path.split("/").first
return true if wizard_id == "qunit"
CustomWizard::Template.exists?(wizard_id.underscore)
end
end
2021-03-11 07:30:15 +01:00
end