Open robban opened 9 years ago
I am also looking for the same thing, I went through the source code of gem but did not find any method for deleting the rate.
Just in case if somebody is looking for a patch then here it is. I overode this module and added clear_rating method. Also need to override the update_rating_cahce method to give the correct average_rating.
Please see this gist https://gist.github.com/piyushbeli/8b92068ce72d28ed155a
@piyushbeli Thank you for the fix! I'm not sure how to implement it though, having already installed ratyrate. I can't find anything called "ratyrate" doing a project-wide search in my app. Can you provide any additional implementation advice? Thanks again!
Currently, when you press the cancel rating button, it essentially works as a rating with zero stars. This draws down the average rating. Correct behaviour would be to delete the rating if it exists in the database.