lib/ajaxful_rating.rb
# Rating average for the object.
Rating average for the object.
Rating average for the object .
def rate_average(cached = true)
        avg = if cached && self.class.caching_average?
          self[self.class.cached_average_column]
        else
          self.rates_sum.to_f / self.total_rates.to_f
        end.to_f
        avg.nan? ? 0.0 : avg
      end
def rate_average ( cached = true ) avg = if cached && self . class . caching_average? self [ self . class . cached_average_column ] else self . rates_sum . to_f / self . total_rates . to_f end . to_f avg . nan? ? 0.0 : avg end
Rating average for the object.
Rating average for the object .
cached
<not_specific>