From 052f83cda527b648eb3a5a09703a67cc8fc80756 Mon Sep 17 00:00:00 2001 From: Thomas von Deyen Date: Fri, 6 Jan 2023 22:29:42 +0100 Subject: [PATCH] Allow to set preview_sources Before you could only add additional sources, but you maybe want to override the one default source. --- lib/alchemy.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/alchemy.rb b/lib/alchemy.rb index 45a27d26d0..a506b2161c 100644 --- a/lib/alchemy.rb +++ b/lib/alchemy.rb @@ -57,6 +57,10 @@ def self.preview_sources @_preview_sources ||= Set.new << Alchemy::Admin::PreviewUrl end + def self.preview_sources=(sources) + @_preview_sources = Array(sources) + end + # Define page publish targets # # A publish target is a ActiveJob that gets performed