Skip to content

Commit e81f255

Browse files
committed
Remove erroneous 'Legacy' comment on PayloadBuilder::TopicalEvents
Whilst it's true that config-driven documents won't use this module - they'll use the ConfigurableAssociations instead - there are plenty of content types that are still dependent on PayloadBuilder::TopicalEvents until they too are converted to being config-driven. This commit makes that clear by inlining a comment on the module.
1 parent 36823be commit e81f255

File tree

7 files changed

+11
-6
lines changed

7 files changed

+11
-6
lines changed

app/presenters/publishing_api/call_for_evidence_presenter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def edition_links
4747
.extract(%i[organisations government])
4848
.merge(PayloadBuilder::People.for(call_for_evidence))
4949
.merge(PayloadBuilder::Roles.for(call_for_evidence))
50-
.merge(PayloadBuilder::TopicalEvents.for(call_for_evidence)) # Legacy
50+
.merge(PayloadBuilder::TopicalEvents.for(call_for_evidence))
5151
end
5252

5353
private

app/presenters/publishing_api/consultation_presenter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def edition_links
4747
.extract(%i[organisations government])
4848
.merge(PayloadBuilder::People.for(consultation))
4949
.merge(PayloadBuilder::Roles.for(consultation))
50-
.merge(PayloadBuilder::TopicalEvents.for(consultation)) # Legacy
50+
.merge(PayloadBuilder::TopicalEvents.for(consultation))
5151
end
5252

5353
private

app/presenters/publishing_api/detailed_guide_presenter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def edition_links
4545
related_guides: item.related_detailed_guide_content_ids,
4646
related_mainstream_content: related_mainstream_content_ids,
4747
).merge(
48-
PayloadBuilder::TopicalEvents.for(item), # Legacy
48+
PayloadBuilder::TopicalEvents.for(item),
4949
)
5050
end
5151

app/presenters/publishing_api/document_collection_presenter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def edition_links
4545
)
4646
links[:documents] = item.content_ids.uniq
4747
links[:taxonomy_topic_email_override] = [item.taxonomy_topic_email_override] if item.taxonomy_topic_email_override
48-
links.merge!(PayloadBuilder::TopicalEvents.for(item)) # Legacy
48+
links.merge!(PayloadBuilder::TopicalEvents.for(item))
4949
end
5050

5151
def document_type

app/presenters/publishing_api/payload_builder/topical_events.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# Config-driven content types present their 'topical event' associations via the
2+
# `ConfigurableDocumentLinks` payload builder. When all content types have been
3+
# migrated to being config-driven, we'll be able to delete this module. For now,
4+
# it's the only means through which 'legacy' content types can present their
5+
# 'config-driven topical event' associations.
16
module PublishingApi
27
module PayloadBuilder
38
class TopicalEvents

app/presenters/publishing_api/publication_presenter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def edition_links
4646
government
4747
],
4848
).merge(
49-
PayloadBuilder::TopicalEvents.for(item), # Legacy
49+
PayloadBuilder::TopicalEvents.for(item),
5050
).merge(
5151
related_statistical_data_sets:,
5252
).merge(

app/presenters/publishing_api/speech_presenter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def links
6262
],
6363
)
6464
links.merge!(links_for_speaker)
65-
links.merge!(PayloadBuilder::TopicalEvents.for(item)) # Legacy
65+
links.merge!(PayloadBuilder::TopicalEvents.for(item))
6666
links.merge!(PayloadBuilder::Roles.for(item))
6767
links.merge!(PayloadBuilder::People.for(item))
6868
end

0 commit comments

Comments
 (0)