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

Bug when save the rating in database

opened this issue · comments

When user clicks for rating 5 for the example, the rating in rates table is not 5, but 4.* or float which is not correct, because user wants to set an reting 5 . If half star is enabled and 2 users want to select 3.5 rating, average rating can be something like (3.222 + 3.333)/2 or 3.2775 the helper will round it to 3, which is not correct. The correct average rating in this case must be 3.5, and their ratings must be 3.5