Skip to content

Commit

Permalink
fix link_to_external method
Browse files Browse the repository at this point in the history
  • Loading branch information
AndriyAndriyovuch committed Nov 16, 2023
1 parent 69eb677 commit 4cef238
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/helpers/calculators_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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(

Check warning on line 27 in app/helpers/calculators_helper.rb

View check run for this annotation

Codecov / codecov/patch

app/helpers/calculators_helper.rb#L26-L27

Added lines #L26 - L27 were not covered by tests
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
Expand Down

0 comments on commit 4cef238

Please sign in to comment.