Add comments controller and routes

This commit is contained in:
riggraz
2019-09-16 18:02:52 +02:00
parent 3f4eba70d7
commit 3c6e27be14
7 changed files with 25 additions and 7 deletions

View File

@@ -2,6 +2,7 @@ class Post < ApplicationRecord
belongs_to :board
belongs_to :user
belongs_to :post_status, optional: true
has_many :comments
validates :title, presence: true, length: { in: 4..64 }