From 0faab42c2a8d97b2e2389a5168074aa99c4b45f4 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bellet Date: Fri, 8 Oct 2021 11:07:15 +0200 Subject: [PATCH] Fix Ruby 2.7 warning"Using the last argument as keyword parameters is deprecated;" https://bloggie.io/@kinopyo/how-to-fix-ruby-2-7-warning-using-the-last-argument-as-keyword-parameters-is-deprecated --- app/views/shared/_footer.html.haml | 6 +++--- app/views/shop/messages/_customer_required.html.haml | 12 +++--------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/app/views/shared/_footer.html.haml b/app/views/shared/_footer.html.haml index aae6fdcebe..d4b61ccdba 100644 --- a/app/views/shared/_footer.html.haml +++ b/app/views/shared/_footer.html.haml @@ -105,11 +105,11 @@ = t '.footer_legal_visit' %a{href:"https://github.com/openfoodfoundation/openfoodnetwork", target: "_blank"} GitHub %p.text-small - = t '.footer_legal_text_html', {content_license: link_to('CC BY-SA 3.0', 'https://creativecommons.org/licenses/by-sa/3.0/'), code_license: link_to('AGPL 3', 'https://tldrlegal.com/license/gnu-affero-general-public-license-v3-(agpl-3.0)' )} + = t('.footer_legal_text_html', content_license: link_to('CC BY-SA 3.0', 'https://creativecommons.org/licenses/by-sa/3.0/'), code_license: link_to('AGPL 3', 'https://tldrlegal.com/license/gnu-affero-general-public-license-v3-(agpl-3.0)' )) %p.text-small - if Spree::Config.privacy_policy_url.present? - = t '.footer_data_text_with_privacy_policy_html', {cookies_policy: cookies_policy_link.html_safe, privacy_policy: privacy_policy_link.html_safe } + = t('.footer_data_text_with_privacy_policy_html', cookies_policy: cookies_policy_link.html_safe, privacy_policy: privacy_policy_link.html_safe) - else - = t '.footer_data_text_without_privacy_policy_html', {cookies_policy: cookies_policy_link.html_safe } + = t('.footer_data_text_without_privacy_policy_html', cookies_policy: cookies_policy_link.html_safe) .medium-2.columns.text-center / Placeholder diff --git a/app/views/shop/messages/_customer_required.html.haml b/app/views/shop/messages/_customer_required.html.haml index 146fee9fcf..04390f659c 100644 --- a/app/views/shop/messages/_customer_required.html.haml +++ b/app/views/shop/messages/_customer_required.html.haml @@ -6,14 +6,8 @@ %p - if spree_current_user.nil? %p - = t '.require_login_html', - {login: ('' + t('.login') + '').html_safe, - signup: ('' + t('.signup') + '').html_safe} + = t('.require_login_html', login: ('' + t('.login') + '').html_safe, signup: ('' + t('.signup') + '').html_safe) %p - = t '.require_login_2_html', - {contact: link_to(t('.contact'), '#contact'), - enterprise: current_distributor.name} + = t('.require_login_2_html', contact: link_to(t('.contact'), '#contact'), enterprise: current_distributor.name) - else - = t '.require_customer_html', - {contact: link_to(t('.contact'), '#contact'), - enterprise: current_distributor.name} + = t('.require_customer_html', contact: link_to(t('.contact'), '#contact'), enterprise: current_distributor.name)