ratyrate
ratyrate copied to clipboard
It would be great if this was more documented
So everything seems to display correctly...at least initially.
Looking at the results of the actual RATES database table I would think that only one combination of rater_id, rateable_id and dimension should exist. You do not want users mutli rating (stuffing the ballot box).. Even with the disable_after_rating is set to TRUE you can still change the rating. The Averages are displayed but if you click on or off any of the star the results get appended to the rates table. ????
The rating_caches table is the averages for each cacheable_id (same as rateable_id) and dimension combination.
I like the idea of displaying the average separately from the current user's ratings but the average stars should be fixed and unchangeable (they are not).
Id hate to have do this by scratch.
thanks for any insight STeve
have you seen his tutorial? http://www.sitepoint.com/ratyrate-add-rating-rails-app/
Hi mrdinghy,
I'd like to break your comments out into some smaller pieces so they will be easier to address and to do so, I'd like to ask some questions just to make sure I've got a good understanding before I do so.
- "It would be great if this was more documented" What kind of documentation would you like to see? More use cases? More examples? More detailed set up? What would help make this gem easier to use?
- " Looking at the results of the actual RATES database table I would think that only one combination of rater_id, rateable_id and dimension should exist. You do not want users mutli rating (stuffing the ballot box)." In my testing, each user can only submit one rating per rater_id, rateable_id and dimension. If you are experiencing a case where someone is able to rate multiple times as the same user, same object and same dimension, could you give some more detail on how it was set up? Or better yet, post some sample code?
- "Even with the disable_after_rating is set to TRUE you can still change the rating." I have not seen this behavior either, a code sample for this would be great as well.
- "The Averages are displayed but if you click on or off any of the star the results get appended to the rates table." Looking at the rates table on some of my test setups, my rates tables get updated, not appended. Can you post an example where this is happening to you? (Also, is this sqlite or prosgres, or what flavor DB?)
- "The rating_caches table is the averages for each cacheable_id (same as rateable_id) and dimension combination." What would be a better approach to take for this?
- "I like the idea of displaying the average separately from the current user's ratings but the average stars should be fixed and unchangeable (they are not)." I'll try to reproduce this and see if I can get it to work.
Thanks for your questions, hopefully we can get these worked out for you.