foodsoft/app/models/order_comment.rb

8 lines
178 B
Ruby

class OrderComment < ApplicationRecord
belongs_to :order
belongs_to :user
validates_presence_of :order_id, :user_id, :text
validates_length_of :text, :minimum => 3
end