clarion/app/models/concerns/feedback_receiving.rb
2019-04-30 01:04:40 +03:00

12 lines
163 B
Ruby

module FeedbackReceiving
extend ActiveSupport::Concern
def average_rating
feedbacks.average(:rating)
end
def rated?
feedbacks.size > 0
end
end