I tried to add a simple HTML class to my link_to
tag:
<%= link_to "Individual Images", action: 'feature_highlights', site_title: site.title, class: "btn" %>
..but it gets appended to the URL instead:
How do I add a class to my link_to tag?
I tried to add a simple HTML class to my link_to
tag:
<%= link_to "Individual Images", action: 'feature_highlights', site_title: site.title, class: "btn" %>
..but it gets appended to the URL instead:
How do I add a class to my link_to tag?
Copyright © 2021 Jogjafile Inc.
As per the API docs:
So, the solution was
<%= link_to "Individual Images", { action: 'feature_highlights', site_title: site.title }, class: "btn" %>