1
0
Fork 0
discourse-custom-wizard-unl.../extensions/extra_locales_controller.rb
2021-02-24 18:50:42 +11:00

11 Zeilen
329 B
Ruby

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