Modify minimum comment body length

This commit is contained in:
riggraz
2019-09-30 18:49:15 +02:00
parent 551feef79e
commit 1d211e61ad
2 changed files with 1 additions and 7 deletions

View File

@@ -4,5 +4,5 @@ class Comment < ApplicationRecord
belongs_to :parent, class_name: 'Comment', optional: true
has_many :children, class_name: 'Comment', foreign_key: 'parent_id', dependent: :destroy
validates :body, presence: true, length: { minimum: 4 }
validates :body, presence: true
end