From d1cafe637ab4eea595d49cb2d3d652a371c11aaf Mon Sep 17 00:00:00 2001 From: Andy Sellick Date: Mon, 1 Feb 2021 09:34:44 +0000 Subject: [PATCH] Fix 'rendering actions with .' deprecation warning --- .../components/_attachment.html.erb | 6 +++--- ..._thumbnail_document.svg => _thumbnail_document.html.erb} | 0 .../{_thumbnail_generic.svg => _thumbnail_generic.html.erb} | 0 ...nail_spreadsheet.svg => _thumbnail_spreadsheet.html.erb} | 0 spec/dummy/app/views/layouts/application.html.erb | 2 +- 5 files changed, 4 insertions(+), 4 deletions(-) rename app/views/govuk_publishing_components/components/attachment/{_thumbnail_document.svg => _thumbnail_document.html.erb} (100%) rename app/views/govuk_publishing_components/components/attachment/{_thumbnail_generic.svg => _thumbnail_generic.html.erb} (100%) rename app/views/govuk_publishing_components/components/attachment/{_thumbnail_spreadsheet.svg => _thumbnail_spreadsheet.html.erb} (100%) diff --git a/app/views/govuk_publishing_components/components/_attachment.html.erb b/app/views/govuk_publishing_components/components/_attachment.html.erb index ff958ba737..64bb1a485e 100644 --- a/app/views/govuk_publishing_components/components/_attachment.html.erb +++ b/app/views/govuk_publishing_components/components/_attachment.html.erb @@ -41,11 +41,11 @@ "aria-hidden": true, data: data_attributes do %> <% if attachment.document? %> - <%= render "govuk_publishing_components/components/attachment/thumbnail_document.svg" %> + <%= render "govuk_publishing_components/components/attachment/thumbnail_document" %> <% elsif attachment.spreadsheet? %> - <%= render "govuk_publishing_components/components/attachment/thumbnail_spreadsheet.svg" %> + <%= render "govuk_publishing_components/components/attachment/thumbnail_spreadsheet" %> <% else %> - <%= render "govuk_publishing_components/components/attachment/thumbnail_generic.svg" %> + <%= render "govuk_publishing_components/components/attachment/thumbnail_generic" %> <% end %> <% end %> <% end %> diff --git a/app/views/govuk_publishing_components/components/attachment/_thumbnail_document.svg b/app/views/govuk_publishing_components/components/attachment/_thumbnail_document.html.erb similarity index 100% rename from app/views/govuk_publishing_components/components/attachment/_thumbnail_document.svg rename to app/views/govuk_publishing_components/components/attachment/_thumbnail_document.html.erb diff --git a/app/views/govuk_publishing_components/components/attachment/_thumbnail_generic.svg b/app/views/govuk_publishing_components/components/attachment/_thumbnail_generic.html.erb similarity index 100% rename from app/views/govuk_publishing_components/components/attachment/_thumbnail_generic.svg rename to app/views/govuk_publishing_components/components/attachment/_thumbnail_generic.html.erb diff --git a/app/views/govuk_publishing_components/components/attachment/_thumbnail_spreadsheet.svg b/app/views/govuk_publishing_components/components/attachment/_thumbnail_spreadsheet.html.erb similarity index 100% rename from app/views/govuk_publishing_components/components/attachment/_thumbnail_spreadsheet.svg rename to app/views/govuk_publishing_components/components/attachment/_thumbnail_spreadsheet.html.erb diff --git a/spec/dummy/app/views/layouts/application.html.erb b/spec/dummy/app/views/layouts/application.html.erb index bcae12112d..27512eafc9 100644 --- a/spec/dummy/app/views/layouts/application.html.erb +++ b/spec/dummy/app/views/layouts/application.html.erb @@ -13,7 +13,7 @@
<%= yield %>
- <%= render "govuk_publishing_components/components/attachment/thumbnail_spreadsheet.svg" %> + <%= render "govuk_publishing_components/components/attachment/thumbnail_spreadsheet" %> <%= render "govuk_publishing_components/components/feedback" %>