-
Notifications
You must be signed in to change notification settings - Fork 127
no rating_average #30
Comments
Same problem for me. |
Copied from the readme file: To use caching with dimensions, make sure you have a cache column defined for each dimension you want cached. |
I have no problem to cache dimensions, but I think what's about here, is to have a new column with the average rate: rating_average_a = 4 rating_average = 3,33 Should we do it on app side or is it possible with ajaxful-rating ? Thx, |
Oh so you want to have the average calculated with all dimensions? That's not possible in the plugin yet, it only calculates the average for each dimension. |
Yes that would be very useful. Is it on the "To Code" list ? ;) |
I think you're the first person that request it. So I will add it to the ToDo list, or if you want to add that feature and send me a pull request that'd be great, I haven't had too much time lately. |
I just comment the condition in has_many :rates_without_dimension and it work :) if options[:dimensions].blank? has_many :rates_without_dimension, :as => :rateable, :class_name => 'Rate', :dependent => :destroy, :conditions => {:dimension => nil} else has_many :rates_without_dimension, :as => :rateable, :class_name => 'Rate', :dependent => :destroy end Then it update rating_average |
I agree a rating average would be quite useful! Especially for my app! |
I impleneted ajaxful rating on a Store model with 3 dimensions. I am
caching rating average for each dimension as well as the overall
average rating. The individual dimension rates are being saved and
shown correctly (including average per dimension) and everything works fine except, the "rating_average"
does not update (still at 0) even after multiple users have updated it
for a specific record.
The text was updated successfully, but these errors were encountered: