diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-08-20 13:19:38 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-08-20 13:19:38 +0200 |
| commit | 3e77e5fca9f66f5be9c12085fd68c4e9d0ba79be (patch) | |
| tree | 84cda6084db055c3e1cf2dcc2da2508a98826a26 /app/models/page.rb | |
| parent | 9d5c3cf1e5db83203ac30f3c1ddee9a61e4b14d0 (diff) | |
Force a blank redirect status to nil
Diffstat (limited to 'app/models/page.rb')
| -rw-r--r-- | app/models/page.rb | 2 |
1 files changed, 2 insertions, 0 deletions
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 | |||
| 12 | 12 | ||
| 13 | translates :title, :abstract, :body # Globalize2 | 13 | translates :title, :abstract, :body # Globalize2 |
| 14 | 14 | ||
| 15 | before_validation { self.redirect = nil if redirect.blank? } | ||
| 16 | |||
| 15 | # Template names render as filesystem paths; only names actually | 17 | # Template names render as filesystem paths; only names actually |
| 16 | # present in the public template directory are acceptable. Validated | 18 | # present in the public template directory are acceptable. Validated |
| 17 | # only on change so legacy rows whose template file has since | 19 | # only on change so legacy rows whose template file has since |
