Reputation:
I have a problem with my code, I want it to display n number of stars. It display the right number of stars, plus the integer like ***3
I only want ***
show.html.slim
= article.rating_average.times do
span
i.fa.fa-star
Upvotes: 0
Views: 89
Reputation: 52357
Change =
to -
:
- article.rating_average.times do
%span.fa.fa-star
=
evaluates code and prints the returned value (3
is a return value of article.rating_average.times {}
)-
just evaluates code (gives you 3 stars without the returned value printed)Upvotes: 1