blob: ceade9aaf1334bab4f2160be760a108f25158035 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
# frozen_string_literal: true
# ProductReview
# review: text
# rating: integer
class ProductReview < ApplicationRecord
belongs_to :user_account
belongs_to :product
validates :review, presence: true
validates :rating, presence: true, inclusion: { in: 1..5 }
end
|