11 lines
298 B
Ruby
11 lines
298 B
Ruby
class Comment < ApplicationRecord
|
|
include Messageable, Notifiable, Searchable
|
|
|
|
belongs_to :creator, class_name: "User", default: -> { Current.user }
|
|
has_many :reactions, dependent: :destroy
|
|
|
|
searchable_by :body_plain_text, using: :comments_search_index, as: :body
|
|
|
|
has_markdown :body
|
|
end
|