Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-22 01:10:28 +01:00
14 Zeilen
470 B
Ruby
14 Zeilen
470 B
Ruby
# frozen_string_literal: true
|
|
module ExtraLocalesControllerCustomWizard
|
|
private def valid_bundle?(bundle)
|
|
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
|
|
end
|