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
|
|
|
|
wizard_id = path.split('/w/').last
|
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
|