Skip to content

Commit

Permalink
Merge pull request #8699 from alphagov/add-ed-ww-org-summary
Browse files Browse the repository at this point in the history
Present summary for editionable worldwide organisations
  • Loading branch information
brucebolt authored Jan 4, 2024
2 parents 5de3545 + 38305f4 commit cd26616
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/models/editionable_worldwide_organisation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ def skip_world_location_validation?
false
end

def summary_required?
false
end

def translatable?
true
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def content
).base_attributes

content.merge!(
description: item.summary,
details: {
body:,
logo: {
Expand Down
1 change: 1 addition & 0 deletions test/factories/editionable_worldwide_organisations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
factory :editionable_worldwide_organisation, class: EditionableWorldwideOrganisation, parent: :edition_with_organisations do
title { "Editionable worldwide organisation title" }
logo_formatted_name { title.to_s.split.join("\n") }
summary { "Basic information about the organisation." }
body { "Information about the organisation with _italics_." }

after :build do |news_article, evaluator|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def present(...)
public_updated_at: worldwide_org.updated_at,
routes: [{ path: public_path, type: "exact" }],
redirects: [],
description: worldwide_org.summary,
details: {
body: "<div class=\"govspeak\"><p>Information about the organisation with <em>italics</em>.</p>\n</div>",
logo: {
Expand Down

0 comments on commit cd26616

Please sign in to comment.