mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
DRY website fix
This commit is contained in:
@@ -21,11 +21,10 @@ class EnterpriseBuilder < DfcBuilder
|
||||
localizations: [address],
|
||||
phoneNumbers: [enterprise.phone].compact,
|
||||
socialMedias: SocialMediaBuilder.social_medias(enterprise),
|
||||
websites: [enterprise.website].compact,
|
||||
).tap do |e|
|
||||
# The model strips the protocol and we need to add it:
|
||||
e.websites = e.websites.map { |url| "https://#{url}" }
|
||||
|
||||
# The model strips the protocol and we need to add it:
|
||||
websites: [enterprise.website].compact.map { |url| "https://#{url}" },
|
||||
).tap do |e|
|
||||
add_ofn_property(e, "ofn:long_description", enterprise.long_description)
|
||||
|
||||
# This could be expressed as dfc-b:hasMainContact Person with name.
|
||||
|
||||
Reference in New Issue
Block a user