From 835af696703484208882a70cc5dd47c5838ecf58 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Thu, 12 Oct 2023 17:10:34 -0400 Subject: Added blog post commenting --- app/models/blog.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/models/blog.rb') diff --git a/app/models/blog.rb b/app/models/blog.rb index 415167c..b677e2b 100644 --- a/app/models/blog.rb +++ b/app/models/blog.rb @@ -3,6 +3,8 @@ class Blog < ApplicationRecord acts_as_taggable + has_many :comments + validates :title, presence: true validates :body, presence: true, if: :published validates :slug, presence: true, format: /\A[-a-z0-9]+\z/, if: :published -- cgit 1.4.1