Skip to content

Commit

Permalink
Add custom meta tag for spellign suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
kr8n3r committed Nov 1, 2019
1 parent ae3c6fc commit 38240a9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/views/finders/_spelling_suggestion.html.erb
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
<% _spelling_suggestion = '' %>
<% if @spelling_suggestion_presenter.suggestions.any? %>
<p class="govuk-body">Did you mean
<% @spelling_suggestion_presenter.suggestions.each do |suggestion| %>
<%= link_to suggestion[:keywords], suggestion[:link],
class: "govuk-link govuk-!-font-weight-bold",
:data => suggestion[:data_attributes]
%>
<% _spelling_suggestion = suggestion[:keywords] %>
<% end %>
</p>
<% end %>
<% content_for :head do %>
<meta name="govuk:spelling-suggestion" content="<%= _spelling_suggestion %>">
<% end %>

0 comments on commit 38240a9

Please sign in to comment.