From 268063522b272db22d4ad498f3ef5e183bbb038c Mon Sep 17 00:00:00 2001 From: Peter Hamilton Date: Wed, 25 Oct 2023 16:53:58 +0100 Subject: [PATCH] Fix production asset compilation within container build (#923) --- config/application.rb | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/config/application.rb b/config/application.rb index 3d2cd8d9e..a89251da4 100644 --- a/config/application.rb +++ b/config/application.rb @@ -92,18 +92,15 @@ def dashboard? Types::Params::Bool[ENV.fetch('DASHBOARD_UPDATE', true)] end - # CI workflow uses DELIVERY - # CMS validation workflow uses PREVIEW then DELIVERY - # # @see ContentfulRails.configuration.enable_preview_domain # @see ContentfulModel.use_preview_api # # @return [Boolean] def preview? - if Rails.env.test? && ENV['CONTENTFUL_PREVIEW'].blank? - false - else + if defined?(::Types) Types::Params::Bool[ENV.fetch('CONTENTFUL_PREVIEW', false)] + else + false end end