0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-05-19 23:40:07 +02:00
discourse-custom-wizard/lib/custom_wizard/extensions/extra_locales_controller.rb
2022-03-12 14:00:07 +01:00

13 Zeilen
408 B
Ruby

# frozen_string_literal: true
module ExtraLocalesControllerCustomWizard
private def valid_bundle?(bundle)
super || begin
return false unless bundle =~ /wizard/ && request.referer =~ /\/w\//
path = URI(request.referer).path
wizard_path = path.split('/w/').last
wizard_id = wizard_path.split('/').first
CustomWizard::Template.exists?(wizard_id.underscore)
end
end
end