From 3e77e5fca9f66f5be9c12085fd68c4e9d0ba79be Mon Sep 17 00:00:00 2001 From: erdgeist Date: Thu, 20 Aug 2026 13:19:38 +0200 Subject: Force a blank redirect status to nil --- app/models/page.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/models/page.rb') diff --git a/app/models/page.rb b/app/models/page.rb index 2f52c498..5d3cb0aa 100644 --- a/app/models/page.rb +++ b/app/models/page.rb @@ -12,6 +12,8 @@ class Page < ApplicationRecord translates :title, :abstract, :body # Globalize2 + before_validation { self.redirect = nil if redirect.blank? } + # Template names render as filesystem paths; only names actually # present in the public template directory are acceptable. Validated # only on change so legacy rows whose template file has since -- cgit v1.3