2021-03-11 17:30:15 +11:00
|
|
|
# frozen_string_literal: true
|
2020-11-23 10:11:45 +11:00
|
|
|
module ExtraLocalesControllerCustomWizard
|
2020-11-23 11:11:13 +11:00
|
|
|
private def valid_bundle?(bundle)
|
|
|
|
super || begin
|
|
|
|
return false unless bundle =~ /wizard/ && request.referer =~ /\/w\//
|
|
|
|
path = URI(request.referer).path
|
2021-05-18 16:10:43 +05:30
|
|
|
wizard_path = path.split('/w/').last
|
|
|
|
wizard_id = wizard_path.split('/').first
|
2021-03-11 17:30:15 +11:00
|
|
|
CustomWizard::Template.exists?(wizard_id.underscore)
|
2020-11-23 10:11:45 +11:00
|
|
|
end
|
|
|
|
end
|
2021-03-11 17:30:15 +11:00
|
|
|
end
|