wazery / ratyrate

:star: A Ruby Gem that wraps the functionality of jQuery Raty library, and provides optional IMDB style rating.

Home Page:http://ratingmoviestore.herokuapp.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rating_for only shows average stars after current_user has rated the dimension

ekeast opened this issue · comments

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