diff options
author | David Gay <david@davidgay.org> | 2021-06-06 17:57:43 -0400 |
---|---|---|
committer | David Gay <david@davidgay.org> | 2021-06-06 17:57:43 -0400 |
commit | 3622126380278d9bed8ea0e1e05a0bd1ea040596 (patch) | |
tree | f34f85368138cc3038f362ac4c68a9d5756f55fc /app/models | |
parent | 387684c8be4691c4469677e48e1b0a46ad600363 (diff) |
Messages
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/message.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/message.rb b/app/models/message.rb new file mode 100644 index 0000000..68d6d94 --- /dev/null +++ b/app/models/message.rb @@ -0,0 +1,6 @@ +class Message < ApplicationRecord + belongs_to :sender, class_name: "Character", optional: true + belongs_to :recipient, class_name: "Character" + + validates :body, length: { minimum: 1, maximum: 10000 } +end |