diff options
Diffstat (limited to 'app')
| -rw-r--r-- | app/models/node.rb | 6 | ||||
| -rw-r--r-- | app/models/page.rb | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/app/models/node.rb b/app/models/node.rb index b5b18a1..a440c2f 100644 --- a/app/models/node.rb +++ b/app/models/node.rb | |||
| @@ -31,9 +31,9 @@ class Node < ApplicationRecord | |||
| 31 | validate :reserved_slug_stays_reserved | 31 | validate :reserved_slug_stays_reserved |
| 32 | validate :no_head_inside_trash | 32 | validate :no_head_inside_trash |
| 33 | validates :default_template_name, | 33 | validates :default_template_name, |
| 34 | :inclusion => { :in => ->(_) { Page.custom_templates } }, | 34 | :inclusion => { :in => ->(_) { Page.custom_templates } }, |
| 35 | :allow_nil => true, | 35 | :allow_blank => true, |
| 36 | :if => :default_template_name_changed? | 36 | :if => :default_template_name_changed? |
| 37 | 37 | ||
| 38 | # Everything outside the Trash subtree, the Trash node included. | 38 | # Everything outside the Trash subtree, the Trash node included. |
| 39 | # Relies on unique_name being authoritative for tree position -- | 39 | # Relies on unique_name being authoritative for tree position -- |
diff --git a/app/models/page.rb b/app/models/page.rb index c4d66fc..f33d88d 100644 --- a/app/models/page.rb +++ b/app/models/page.rb | |||
| @@ -17,9 +17,9 @@ class Page < ApplicationRecord | |||
| 17 | # vanished stay saveable -- valid_template already falls back to | 17 | # vanished stay saveable -- valid_template already falls back to |
| 18 | # standard_template for those at render time. | 18 | # standard_template for those at render time. |
| 19 | validates :template_name, | 19 | validates :template_name, |
| 20 | :inclusion => { :in => ->(_) { Page.custom_templates } }, | 20 | :inclusion => { :in => ->(_) { Page.custom_templates } }, |
| 21 | :allow_nil => true, | 21 | :allow_blank => true, |
| 22 | :if => :template_name_changed? | 22 | :if => :template_name_changed? |
| 23 | 23 | ||
| 24 | # Associations | 24 | # Associations |
| 25 | belongs_to :node, optional: true | 25 | belongs_to :node, optional: true |
