rating_for only shows average stars after current_user has rated the dimension
ekeast opened this issue · 0 comments
ekeast commented
Hi,
I'm having trouble making the rating_for method display the average number of stars. For some reason it will only show the average number of stars after the current_user provides his own rating for the dimension. Before the user provides his rating, the stars are blank. Here is how I call the method in my view:
<% @articles.each do | article | %>
Rating: <%= rating_for article, "link", disable_after_rate: false %>
<% end %>
Please let me know if you have any ideas or input for how to make it display the average rating before the user provides his own rating.
Thanks,
ekeast