diff --git a/content/index.html.erb b/content/index.html.erb index 4e21fe4..289156a 100644 --- a/content/index.html.erb +++ b/content/index.html.erb @@ -35,11 +35,8 @@ unless @items["/cover/#{book[:isbn]}.*"].nil?
- <% book[:rating].times do |star_on| %> - <%= star_svg(filled: true) %> - <% end %> - <% (10 - book[:rating]).times do |star_off| %> - <%= star_svg(filled: false) %> + <% 10.times do |i| %> + <%= star_svg(filled: i < book[:rating]) %> <% end %>
-<% @item[:rating].times do |star_on| %> -<%= star_svg(filled: true) %> -<% end %> -<% (10 - @item[:rating]).times do |star_off| %> -<%= star_svg(filled: false) %> +<% 10.times do |i| %> +<%= star_svg(filled: i < @item[:rating]) -%> <% end %>