Class: OpenLoam::Comment

Inherits:
TenantRecord
  • Object
show all
Includes:
Eventful
Defined in:
app/models/open_loam/comment.rb

Overview

A note by one person, on one record, in one tenant. Polymorphic, so any entity that include OpenLoam::Commentable gets a discussion for free.

Not audited on purpose: the comment IS the activity record. A OpenLoam::AuditRecord saying "someone created a comment" beside a comment saying what they wrote is the same fact stored twice.

Evented on purpose, in OpenLoam's own domain ("open_loam.comment.created"), because a new comment is exactly the kind of thing an app wants to react to — notify the watchers, ping a webhook — without every app inventing its own event name for it.