diff options
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 |