I have the following HTML markup:
<div class="votes meta engagement">
<span class="vote-count">
<span class="vote-total">
<strong><%= @post.total_votes %></strong>
</span>
</span>
<span class="vote-text secondary">votes by</span>
<span class='voted-user'>
<% @post.votes.each do |vote| %>
<%= link_to vote.user.username, vote.user %>
<% end %>
</span>
</div>
I can’t do <%= pluralize(@post_total_votes, "vote") %> because I need that text to be right before by in the vote-text div.
How can I solve this situation?
Shouldn’t this work for what you’re trying to do?
edit:
Then wouldn’t this work? You can obviously combine the two rails calls together, but just wanted to make sure this is what you were going for.