Skip to content

Commit f5ec220

Browse files
committed
remove assignment of blank string to page content when template used
1 parent 1c9bc65 commit f5ec220

File tree

1 file changed

+11
-18
lines changed

1 file changed

+11
-18
lines changed

app/builders/better_together/navigation_builder.rb

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,15 @@ def build_better_together # rubocop:todo Metrics/MethodLength, Metrics/AbcSize
2929
published_at: Time.zone.now,
3030
privacy: 'public',
3131
protected: true,
32-
template: 'better_together/static_pages/better_together',
33-
content_en: ''
32+
template: 'better_together/static_pages/better_together'
3433
},
3534
{
3635
title: 'About the Community Engine',
3736
slug: 'better-together/community-engine',
3837
published_at: Time.zone.now,
3938
privacy: 'public',
4039
protected: true,
41-
template: 'better_together/static_pages/community_engine',
42-
content_en: ''
40+
template: 'better_together/static_pages/community_engine'
4341
}
4442
]
4543
)
@@ -81,44 +79,39 @@ def build_footer # rubocop:todo Metrics/MethodLength, Metrics/AbcSize
8179
published_at: Time.zone.now,
8280
privacy: 'public',
8381
protected: true,
84-
template: 'better_together/static_pages/faq',
85-
content_en: ''
82+
template: 'better_together/static_pages/faq'
8683
},
8784
{
8885
title: 'Privacy Policy',
8986
slug: 'privacy-policy',
9087
published_at: Time.zone.now,
9188
privacy: 'public',
9289
protected: true,
93-
template: 'better_together/static_pages/privacy',
94-
content_en: ''
90+
template: 'better_together/static_pages/privacy'
9591
},
9692
{
9793
title: 'Terms of Service',
9894
slug: 'terms-of-service',
9995
published_at: Time.zone.now,
10096
privacy: 'public',
10197
protected: true,
102-
template: 'better_together/static_pages/terms_of_service',
103-
content_en: ''
98+
template: 'better_together/static_pages/terms_of_service'
10499
},
105100
{
106101
title: 'Code of Conduct',
107102
slug: 'code-of-conduct',
108103
published_at: Time.zone.now,
109104
privacy: 'public',
110105
protected: true,
111-
template: 'better_together/static_pages/code_of_conduct',
112-
content_en: ''
106+
template: 'better_together/static_pages/code_of_conduct'
113107
},
114108
{
115109
title: 'Accessibility',
116110
slug: 'accessibility',
117111
published_at: Time.zone.now,
118112
privacy: 'public',
119113
protected: true,
120-
template: 'better_together/static_pages/accessibility',
121-
content_en: ''
114+
template: 'better_together/static_pages/accessibility'
122115
},
123116
{
124117
title: 'Contact',
@@ -306,24 +299,24 @@ def create_unassociated_pages # rubocop:todo Metrics/MethodLength
306299
privacy: 'public',
307300
protected: true,
308301
template: 'better_together/static_pages/community_engine',
309-
layout: 'layouts/better_together/full_width_page',
310-
content_en: ''
302+
layout: 'layouts/better_together/full_width_page'
311303
},
312304
{
313305
title: 'Subprocessors',
314306
slug: 'subprocessors',
315307
published_at: Time.zone.now,
316308
privacy: 'public',
317309
protected: true,
318-
template: 'better_together/static_pages/subprocessors',
319-
content_en: ''
310+
template: 'better_together/static_pages/subprocessors'
320311
}
321312
]
322313
)
323314
end
324315
end
325316

326317
def delete_pages
318+
::BetterTogether::Content::PageBlock.delete_all
319+
::BetterTogether::Content::Block.delete_all
327320
::BetterTogether::Page.delete_all
328321
end
329322

0 commit comments

Comments
 (0)