From aa8759c902ef3670b73eae70b2f833969136b844 Mon Sep 17 00:00:00 2001 From: Leena Gupte Date: Wed, 11 Sep 2024 17:37:56 +0100 Subject: [PATCH] Add MachineReadableMetadataHelper from: https://github.com/alphagov/government-frontend/blob/84047412f6f42eaf380a9092aadfe15037de0d35/app/helpers/machine_readable_metadata_helper.rb --- app/helpers/machine_readable_metadata_helper.rb | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 app/helpers/machine_readable_metadata_helper.rb diff --git a/app/helpers/machine_readable_metadata_helper.rb b/app/helpers/machine_readable_metadata_helper.rb new file mode 100644 index 0000000000..976d19f4b6 --- /dev/null +++ b/app/helpers/machine_readable_metadata_helper.rb @@ -0,0 +1,6 @@ +module MachineReadableMetadataHelper + def machine_readable_metadata(args) + locals = { content_item: @content_item.content_item }.merge(args) # rubocop:disable Rails/HelperInstanceVariable + render("govuk_publishing_components/components/machine_readable_metadata", locals) + end +end \ No newline at end of file