Post follow and updates notifications V1 (#111)

* It is now possible to follow a post in order to receive updates about it
* Notifications are now sent when updates are published
* Post status changes are now tracked
* Update sidebar now shows the post status history
* Mark a comment as a post update using the comment form
* ... more ...
This commit is contained in:
Riccardo Graziosi
2022-05-28 11:03:36 +02:00
committed by GitHub
parent ce7be1b30c
commit dad382d2b1
59 changed files with 1080 additions and 71 deletions

View File

@@ -2,8 +2,12 @@ class Post < ApplicationRecord
belongs_to :board
belongs_to :user
belongs_to :post_status, optional: true
has_many :likes, dependent: :destroy
has_many :follows, dependent: :destroy
has_many :followers, through: :follows, source: :user
has_many :comments, dependent: :destroy
has_many :post_status_changes, dependent: :destroy
validates :title, presence: true, length: { in: 4..64 }