From 4cef23879721a6d9e6502195ac569cd9f5b1132f Mon Sep 17 00:00:00 2001 From: AndriiAndriyovuch Date: Thu, 16 Nov 2023 23:19:02 +0200 Subject: [PATCH] fix link_to_external method --- app/helpers/calculators_helper.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/helpers/calculators_helper.rb b/app/helpers/calculators_helper.rb index dc8a8db13..136ddbf0c 100644 --- a/app/helpers/calculators_helper.rb +++ b/app/helpers/calculators_helper.rb @@ -22,10 +22,10 @@ def month_number(style) end end - def link_to_external(link_text, url, **options) - link_to(url, target: "_blank", rel: "noopener", class: options[:class]) do + def link_to_external(text:, url:, **options) + link_to(url, target: "_blank", rel: "noopener", **options) do concat( - content_tag(:span, link_text, class: "ms-0") + + content_tag(:span, text, class: "ms-0") + content_tag(:i, nil, class: "fas fa-external-link-alt ms-1") ) end