2021-03-11 07:30:15 +01:00
|
|
|
# frozen_string_literal: true
|
2020-11-23 00:11:45 +01:00
|
|
|
module ExtraLocalesControllerCustomWizard
|
2020-11-23 01:11:13 +01:00
|
|
|
private def valid_bundle?(bundle)
|
|
|
|
super || begin
|
|
|
|
return false unless bundle =~ /wizard/ && request.referer =~ /\/w\//
|
|
|
|
path = URI(request.referer).path
|
2021-05-18 12:40:43 +02:00
|
|
|
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)
|
2020-11-23 00:11:45 +01:00
|
|
|
end
|
|
|
|
end
|
2021-03-11 07:30:15 +01:00
|
|
|
end
|