Add Post model

This commit is contained in:
riggraz
2019-08-24 16:51:25 +02:00
parent c66d350004
commit 0ceaa6acb5
5 changed files with 101 additions and 1 deletions

7
app/models/post.rb Normal file
View File

@@ -0,0 +1,7 @@
class Post < ApplicationRecord
belongs_to :board
belongs_to :user
belongs_to :post_status, optional: true
validates :title, presence: true, length: { in: 4..64 }
end