Files
fizzy/app/models/comment.rb
T
Jose Farias c57f18c20c Materialize abstract thread
The domain language is clearer if we just persist a thread. Also rename some models so their purpose is clear.
2024-10-24 17:36:14 -06:00

13 lines
270 B
Ruby

class Comment < ApplicationRecord
include Searchable, Threadable
belongs_to :bubble, touch: true
belongs_to :creator, class_name: "User", default: -> { Current.user }
searchable_by :body, using: :comments_search_index
def thread
bubble.thread
end
end