Skip to content

Commit

Permalink
Use link_to instead of html anchor element
Browse files Browse the repository at this point in the history
So that we can avoid using ERB tags inside an html element attribute
value.

Co-authored-by: James Mead <3169+floehopper@users.noreply.github.com>
  • Loading branch information
chrisroos and floehopper committed Oct 30, 2018
1 parent dfe9b4f commit 8d9b29a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/journey/_error_summary.html.erb
Expand Up @@ -7,7 +7,7 @@
<ul class="govuk-list govuk-error-summary__list">
<% errors.keys.each do |attribute| %>
<li>
<a href="#<%= error_id(attribute) %>"><%= errors[attribute].first %></a>
<%= link_to errors[attribute].first, "##{error_id(attribute)}" %>
</li>
<% end %>
</ul>
Expand Down

0 comments on commit 8d9b29a

Please sign in to comment.