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

22 lines
387 B
Ruby
Raw Normal View History

2019-07-15 17:19:11 -04:00
# frozen_string_literal: true
class PersonComment < ApplicationRecord
2019-07-15 17:56:27 -04:00
default_scope { order(created_at: :asc) }
2019-07-15 17:19:11 -04:00
################
# Associations #
################
belongs_to :person
belongs_to :account, optional: true
2019-07-17 04:34:51 -04:00
has_one_attached :attachment
2019-07-15 17:19:11 -04:00
###############
# Validations #
###############
validates :text, presence: true, length: { in: 1..10_000 }
end