1
0
Fork 0
discourse-custom-wizard-unl.../lib/custom_wizard/extensions/extra_locales_controller.rb

13 Zeilen
408 B
Ruby

2021-03-11 07:30:15 +01:00
# 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
2021-03-11 07:30:15 +01:00
CustomWizard::Template.exists?(wizard_id.underscore)
end
end
2021-03-11 07:30:15 +01:00
end