summaryrefslogtreecommitdiff
path: root/db/seeds/chapters.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/seeds/chapters.rb')
-rw-r--r--db/seeds/chapters.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/db/seeds/chapters.rb b/db/seeds/chapters.rb
index 4d81e3cc..ba14252c 100644
--- a/db/seeds/chapters.rb
+++ b/db/seeds/chapters.rb
@@ -30,12 +30,13 @@ def seed_chapter(parent_id:, slug:, tag:, title_de:, description_de:,
30 end 30 end
31 31
32 # Create node 32 # Create node
33 node = parent.children.create!(slug: slug, external_url: external_url) 33 node = parent.children.create!(slug: slug)
34 node.reload 34 node.reload
35 35
36 # Set up draft with German translation 36 # Set up draft with German translation
37 draft = node.draft 37 draft = node.draft
38 draft.template_name = 'chapter_detail' 38 draft.template_name = 'chapter_detail'
39 draft.external_url = external_url
39 I18n.with_locale(:de) do 40 I18n.with_locale(:de) do
40 draft.title = title_de 41 draft.title = title_de
41 draft.abstract = location || "" 42 draft.abstract = location || ""