diff --git a/app/models/concerns/with_tree.rb b/app/models/concerns/with_tree.rb index d07be887702a56d970d0907bb3c589a12c5eb84c..94e88ff0ecf1b0ca3251d1dbf6aff92bf2b7f4c4 100644 --- a/app/models/concerns/with_tree.rb +++ b/app/models/concerns/with_tree.rb @@ -14,7 +14,7 @@ module WithTree end def ancestors - has_parent? ? parent.ancestors.ordered.push(parent) + has_parent? ? parent.ancestors.push(parent) : [] end diff --git a/db/schema.rb b/db/schema.rb index e83f950a6cc38e1e2d6be0db503fb67fb03976e7..668730d65f00dc95e12ded16d42a275601037626 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -319,10 +319,10 @@ ActiveRecord::Schema.define(version: 2022_04_11_133002) do t.uuid "related_category_id" t.string "featured_image_alt" t.text "text" + t.text "description_short" t.string "breadcrumb_title" t.text "header_text" t.integer "kind" - t.text "description_short" t.index ["communication_website_id"], name: "index_communication_website_pages_on_communication_website_id" t.index ["parent_id"], name: "index_communication_website_pages_on_parent_id" t.index ["related_category_id"], name: "index_communication_website_pages_on_related_category_id"