Class: Review

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/review.rb

Instance Method Summary collapse

Instance Method Details

#feedback_starsObject



16
17
18
19
# File 'app/models/review.rb', line 16

def feedback_stars
  return 0 if feedback_reviews.count <= 0
  ((feedback_reviews.sum(:rating)/feedback_reviews.count) + 0.5).floor
end