clarion/app/models/concerns/feedback_receiving.rb

12 lines
163 B
Ruby
Raw Normal View History

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