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
This commit is contained in:
Jean-Baptiste Bellet
2021-10-08 11:07:15 +02:00
parent 3d87485cd3
commit 0faab42c2a
2 changed files with 6 additions and 12 deletions

View File

@@ -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

View File

@@ -6,14 +6,8 @@
%p
- if spree_current_user.nil?
%p
= t '.require_login_html',
{login: ('<a auth="login">' + t('.login') + '</a>').html_safe,
signup: ('<a auth="signup">' + t('.signup') + '</a>').html_safe}
= t('.require_login_html', login: ('<a auth="login">' + t('.login') + '</a>').html_safe, signup: ('<a auth="signup">' + t('.signup') + '</a>').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)