From a8cf4bd01625ebd341d32ec735a4b885db4c8118 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Sat, 18 Jul 2026 16:32:10 +0200 Subject: Accept blank template names in the allowlist validations --- app/models/page.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/models/page.rb') diff --git a/app/models/page.rb b/app/models/page.rb index c4d66fc4..f33d88d7 100644 --- a/app/models/page.rb +++ b/app/models/page.rb @@ -17,9 +17,9 @@ class Page < ApplicationRecord # vanished stay saveable -- valid_template already falls back to # standard_template for those at render time. validates :template_name, - :inclusion => { :in => ->(_) { Page.custom_templates } }, - :allow_nil => true, - :if => :template_name_changed? + :inclusion => { :in => ->(_) { Page.custom_templates } }, + :allow_blank => true, + :if => :template_name_changed? # Associations belongs_to :node, optional: true -- cgit v1.3