1
0
Fork 0
This repository has been archived on 2023-03-27. You can view files and clone it, but cannot push or open issues or pull requests.
lpr-partynest/app/models/person_comment.rb

21 lines
387 B
Ruby

# frozen_string_literal: true
class PersonComment < ApplicationRecord
default_scope { order(created_at: :asc) }
################
# Associations #
################
belongs_to :person
belongs_to :account, optional: true
has_one_attached :attachment
###############
# Validations #
###############
validates :text, presence: true, length: { in: 1..10_000 }
end